diff --git a/.gitignore b/.gitignore index 7dc54f9..2dde532 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ build/vs17/ [Dd]ebug/ [Rr]elease/ x64/ -build/ [Bb]in/ [Oo]bj/ diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt new file mode 100644 index 0000000..a840d28 --- /dev/null +++ b/build/CMakeLists.txt @@ -0,0 +1,6 @@ +# Include any compiler-specifc settings +if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_CXX_COMPILER_ID}") + include("${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_CXX_COMPILER_ID}/CMakeLists.txt") +else() + message(STATUS "No compiler-specific settings set; CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") +endif() diff --git a/build/GNU/CMakeLists.txt b/build/GNU/CMakeLists.txt new file mode 100644 index 0000000..ee31cab --- /dev/null +++ b/build/GNU/CMakeLists.txt @@ -0,0 +1,4 @@ +# GCC-specific compiler settings + +# Enable pthreads +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") diff --git a/build/MSVC/CMakeLists.txt b/build/MSVC/CMakeLists.txt new file mode 100644 index 0000000..7c9e5ee --- /dev/null +++ b/build/MSVC/CMakeLists.txt @@ -0,0 +1,4 @@ +# Setup MSVC-specific macros +add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -D_CRT_NONSTDC_NO_DEPRECATE) diff --git a/build/cmake_vs17.bat b/build/cmake_vs17.bat new file mode 100644 index 0000000..c957df6 --- /dev/null +++ b/build/cmake_vs17.bat @@ -0,0 +1,4 @@ +rmdir /S /Q vs17 +mkdir vs17 +cd vs17 +cmake ..\.. -G "Visual Studio 15 2017" \ No newline at end of file