Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas Hendri <dipidoo@users.noreply.github.com>2020-05-04 23:31:08 +0300
committerBas Hendri <dipidoo@users.noreply.github.com>2020-05-04 23:31:08 +0300
commit91858ca3f32c4c7d7704b7ed72043caa451377a3 (patch)
tree2a7e1d7aa7ba1d3b67c5e7dfa97f9ba6b0205b6f
parent0ab350f5de8745b1e50d07e33f84c3b5c69098fe (diff)
forces GTEST_HAS_DEATH_TEST
-rw-r--r--CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a12c33..5077fbd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ add_library(GSL INTERFACE)
# determine whether this is a standalone project or included by other projects
set(GSL_STANDALONE_PROJECT OFF)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
- set(GSL_STANDALONE_PROJECT ON)
+ set(GSL_STANDALONE_PROJECT ON)
endif ()
set(GSL_CXX_STANDARD "14" CACHE STRING "Use c++ standard")
@@ -98,6 +98,11 @@ add_library(Microsoft.GSL::GSL ALIAS GSL)
option(GSL_TEST "Generate tests." ${GSL_STANDALONE_PROJECT})
if (GSL_TEST)
- enable_testing()
- add_subdirectory(tests)
+ enable_testing()
+ if(IOS)
+ add_compile_definitions(
+ GTEST_HAS_DEATH_TEST=1
+ )
+ endif()
+ add_subdirectory(tests)
endif ()