forces GTEST_HAS_DEATH_TEST

This commit is contained in:
Bas Hendri 2020-05-04 13:31:08 -07:00
parent 0ab350f5de
commit 91858ca3f3

View File

@ -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 ()