CMake properly uses -DBUILD_TESTS flag, added CmakeSettings.json to gitignore

checksum-failure-logging
EricLiu2000 2019-06-26 11:53:06 -04:00
parent 4923218d35
commit 975c7f422f
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@ build/
build*/ build*/
.DS_Store .DS_Store
Thumbs.db Thumbs.db
CMakeSettings.json
.vscode .vscode
third-party/concurrentqueue/benchmarks third-party/concurrentqueue/benchmarks
third-party/concurrentqueue/tests third-party/concurrentqueue/tests

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.2) cmake_minimum_required(VERSION 3.2)
project(libicsneo VERSION 0.1.1) project(libicsneo VERSION 0.1.1)
option(test "Build all tests." ON) # Makes 'test' variable available option(BUILD_TESTS "Build all tests." OFF) # Makes 'BUILD_TEST' variable available
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
@ -206,7 +206,7 @@ if(NOT WIN32)
endif() endif()
# googletest, hopefully cross-platform and won't have to split into 2 places in CMakeLists # googletest, hopefully cross-platform and won't have to split into 2 places in CMakeLists
if(test) if(BUILD_TESTS)
if(WIN32) if(WIN32)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
endif() endif()