Skip to content

Commit

Permalink
genesis 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SeadexTM committed Jan 7, 2020
0 parents commit b25313d
Show file tree
Hide file tree
Showing 89 changed files with 6,005 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Prerequisites
*.d

# Compiled Object files
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dll

# Compiled Static libraries
*.a
*.lib

# Executables
*.exe

### Windows ###
## Visual Studio files ##
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ww]in32/
[Dd]ebug -*
[Rr]elease -*


# Visual Studio 2015/2017 cache/options directory
.vs/

# Visual Studio 2017 auto generated files
Generated\ Files/


# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
*.VC.db
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(genesis)
add_subdirectory(examples)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# genesis
genesis is a generator library developed by Seadex (written in C++11)
18 changes: 18 additions & 0 deletions build/debug_info.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile />
<Link>
<TargetMachine>NotSet</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ClCompile>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
30 changes: 30 additions & 0 deletions build/genesis.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4127;4250</DisableSpecificWarnings>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link />
<Link>
<Version>
</Version>
<GenerateDebugInformation>No</GenerateDebugInformation>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<Lib>
<LinkTimeCodeGeneration>false</LinkTimeCodeGeneration>
</Lib>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
18 changes: 18 additions & 0 deletions build/use_essentials.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\externals\essentials\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
</ClCompile>
<Lib />
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
18 changes: 18 additions & 0 deletions build/use_essentials_examples.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<DebugInformationFormat>None</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\externals\essentials\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Lib />
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
18 changes: 18 additions & 0 deletions build/use_genesis.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\genesis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
</ClCompile>
<Lib />
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>genesis.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
18 changes: 18 additions & 0 deletions build/use_genesis_examples.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\genesis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
</ClCompile>
<Lib />
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>genesis.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(html_page_generator)
126 changes: 126 additions & 0 deletions examples/html_page_generator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
cmake_minimum_required(VERSION 3.5)

project(html_page_generator)

set(CMAKE_VERBOSE_MAKEFILE, 1)

set(HEADER_FILES "./*.hpp" "./../../genesis/include/*.hpp" "./../../externals/essentials/include/essentials/*.hpp" "./../../externals/essentials/include/essentials/compatibility/*.hpp")
file(GLOB html_page_generator_SRC "./*.cpp" ${HEADER_FILES})

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)


if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if( "${CMAKE_CXX_FLAGS}" STREQUAL "-m64" )
set(extra_flags "${extra_flags} -m64")
message(STATUS "setting platform x64")
else()
set(extra_flags "${extra_flags} -m32")
message(STATUS "setting platform x86")
endif()

if("${CPP_VERSION}" STREQUAL "03")
set(extra_flags "${extra_flags} -std=c++03 -Wall -Wpedantic -g -Wno-unknown-pragmas -D \"SX_CPP03_BOOST\" -D \"SX_NO_VARIADIC_MACRO\"")
else()
set(extra_flags "${extra_flags} -std=c++14 -Wall -Wpedantic -g")
endif()


elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Checks buffer security.
set(extra_flags "${extra_flags} /GS")

#Sets output warning level.
set(extra_flags "${extra_flags} /W4")

#Disable specific Warnings.
set(extra_flags "${extra_flags} /wd\"4127\" /wd\"4250\"")

#Defines constants and macros.
set(extra_flags "${extra_flags} /D \"_CRT_SECURE_NO_WARNINGS\"")

#Enables function-level linking.
set(extra_flags "${extra_flags} /Gy")

#Specifies standard behavior under /Ze.
set(extra_flags "${extra_flags} /Zc:wchar_t /Zc:inline")

#Disable minimal rebuild.
set(extra_flags "${extra_flags} /Gm-")

#Enables additional security features and warnings.
set(extra_flags "${extra_flags} /sdl")

#Specifies floating-point behavior.
set(extra_flags "${extra_flags} /fp:precise")

#Multibyte character sets macro.
set(extra_flags "${extra_flags} /D \"_MBCS\"")

#Enables you to provide internal compiler error (ICE) information directly to the Visual C++ team.
set(extra_flags "${extra_flags} /errorReport:prompt")

#Treats warnings as errors.
set(extra_flags "${extra_flags} /WX")

#Generates intrinsic functions.
set(extra_flags "${extra_flags} /Oi")

#Specifies the model of exception handling.
set(extra_flags "${extra_flags} /EHsc")

#Creates an object file.
set(extra_flags "${extra_flags} /Fo")

#Marks an executable as verified to be compatible with the Windows Data Execution Prevention feature.
#set(extra_flags "${extra_flags} /NXCOMPAT")

endif()

# for release
if( "${CMAKE_BUILD_TYPE}" STREQUAL "Release" )
#Creates fast code.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2")

#Controls LINK optimizations.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /OPT:REF /OPT:ICF")

# for debug
elseif( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
#Creates a program database (PDB) file.
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /PDB")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${extra_flags}")

add_executable(html_page_generator ${html_page_generator_SRC})
include_directories("./../../genesis/include" "./../../externals/essentials/include" "./../../externals/hermes/include")

#using boost
if("${CPP_VERSION}" STREQUAL "03")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
link_directories("${Y_BOOST_LIB_PATH}")
endif()
endif()


if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_link_libraries (html_page_generator LINK_PUBLIC genesis pthread)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_link_libraries (html_page_generator LINK_PUBLIC genesis)
endif()


if("${CPP_VERSION}" STREQUAL "03")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(Boost_USE_STATIC_LIBS ON)
SET(BOOST_ROOT "${Y_BOOST_LIB_INCLUDE}")
SET(Boost_INCLUDE_DIRS "${Y_BOOST_LIB_INCLUDE}")
include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(html_page_generator LINK_PUBLIC ${Boost_LIBRARIES})
endif()
endif()

install(TARGETS html_page_generator DESTINATION bin)
32 changes: 32 additions & 0 deletions examples/html_page_generator/city.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// This file is part of the Seadex genesis library (http://genesis.seadex.de). //
// Copyright( C ) 2017 Seadex GmbH //
// Licensing information is available in the folder "license" which is part of this distribution. //
// The same information is available on the www @ http://genesis.seadex.de/License.html. //
// //
//////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef CITY_0D8BFBB1_EA3F_46E9_B683_1E6FA5233166
#define CITY_0D8BFBB1_EA3F_46E9_B683_1E6FA5233166


#include <string>

// DONE remove cpp
namespace examples
{


struct city
{
std::string name_;
int population_;
};



}


#endif
Loading

0 comments on commit b25313d

Please sign in to comment.