From 91858ca3f32c4c7d7704b7ed72043caa451377a3 Mon Sep 17 00:00:00 2001 From: Bas Hendri Date: Mon, 4 May 2020 13:31:08 -0700 Subject: [PATCH] forces GTEST_HAS_DEATH_TEST --- CMakeLists.txt | 11 ++++++++--- 1 file 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 ()