diff options
Diffstat (limited to 'Tests/CMakeOnly/CheckOBJCCompilerFlag/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeOnly/CheckOBJCCompilerFlag/CMakeLists.txt | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/Tests/CMakeOnly/CheckOBJCCompilerFlag/CMakeLists.txt b/Tests/CMakeOnly/CheckOBJCCompilerFlag/CMakeLists.txt index a9a96ee..a714b73 100644 --- a/Tests/CMakeOnly/CheckOBJCCompilerFlag/CMakeLists.txt +++ b/Tests/CMakeOnly/CheckOBJCCompilerFlag/CMakeLists.txt @@ -1,17 +1,7 @@ -cmake_minimum_required(VERSION 2.8.12) - -project(CheckOBJCCompilerFlag) - +cmake_minimum_required(VERSION 3.16) +project(CheckOBJCCompilerFlag OBJC) include(CheckOBJCCompilerFlag) - -if(CMAKE_COMPILER_IS_GNUOBJC) - set(COMPILER_FLAG -fobjc-direct-dispatch) -else() - set(COMPILER_FLAG -fobjc-gc) -endif() - -CHECK_OBJC_COMPILER_FLAGS(${COMPILER_FLAG} HAS_COMPILER_FLAG) - +check_objc_compiler_flag(-DFOO HAS_COMPILER_FLAG) if(NOT HAS_COMPILER_FLAG) message(SEND_ERROR "Test fail: HAS_COMPILER_FLAG: ${COMPILER_FLAG}") -endif +endif() |