From 975c7f422f9b4ed0266ea8224fe51c2b30653106 Mon Sep 17 00:00:00 2001 From: EricLiu2000 Date: Wed, 26 Jun 2019 11:53:06 -0400 Subject: [PATCH] CMake properly uses -DBUILD_TESTS flag, added CmakeSettings.json to gitignore --- .gitignore | 1 + CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 501296f..5fa14ca 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ build/ build*/ .DS_Store Thumbs.db +CMakeSettings.json .vscode third-party/concurrentqueue/benchmarks third-party/concurrentqueue/tests diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f2a697..8d7a7af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.2) 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) @@ -206,7 +206,7 @@ if(NOT WIN32) endif() # googletest, hopefully cross-platform and won't have to split into 2 places in CMakeLists -if(test) +if(BUILD_TESTS) if(WIN32) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) endif()