diff options
author | Brad King <brad.king@kitware.com> | 2019-12-19 16:38:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-12-19 16:38:53 (GMT) |
commit | 2b6c2e55e7add8ef67d2a6488f2bf4081a64426f (patch) | |
tree | 1f73469921d6bc58588dbb3205ce882d5e70455d /Tests/CMakeOnly/CheckOBJCXXCompilerFlag | |
parent | 10fea25139cc302ef0f0a41aa68b44cda72a4fd2 (diff) | |
download | CMake-2b6c2e55e7add8ef67d2a6488f2bf4081a64426f.zip CMake-2b6c2e55e7add8ef67d2a6488f2bf4081a64426f.tar.gz CMake-2b6c2e55e7add8ef67d2a6488f2bf4081a64426f.tar.bz2 |
Tests: Enable missing Objective C/C++ tests
Some test cases added by commit 80f120a85f (Languages: Add support for
Objective-C, 2019-09-13, v3.16.0-rc1~44^2~3) have never actually been
run because the condition to enable them is never true. Fix the
condition and fix the tests to pass.
Diffstat (limited to 'Tests/CMakeOnly/CheckOBJCXXCompilerFlag')
-rw-r--r-- | Tests/CMakeOnly/CheckOBJCXXCompilerFlag/CMakeLists.txt | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/Tests/CMakeOnly/CheckOBJCXXCompilerFlag/CMakeLists.txt b/Tests/CMakeOnly/CheckOBJCXXCompilerFlag/CMakeLists.txt index f83b738..d09f0b9 100644 --- a/Tests/CMakeOnly/CheckOBJCXXCompilerFlag/CMakeLists.txt +++ b/Tests/CMakeOnly/CheckOBJCXXCompilerFlag/CMakeLists.txt @@ -1,17 +1,7 @@ -cmake_minimum_required(VERSION 2.8.12) - -project(CheckOBJCXXCompilerFlag) - +cmake_minimum_required(VERSION 3.16) +project(CheckOBJCXXCompilerFlag OBJCXX) include(CheckOBJCXXCompilerFlag) - -if(CMAKE_COMPILER_IS_GNUOBJCXX) - set(COMPILER_FLAG -fobjc-direct-dispatch) -else() - set(COMPILER_FLAG -fobjc-gc) -endif() - -CHECK_OBJCXX_COMPILER_FLAGS(${COMPILER_FLAG} HAS_COMPILER_FLAG) - +check_objcxx_compiler_flag(-DFOO HAS_COMPILER_FLAG) if(NOT HAS_COMPILER_FLAG) message(SEND_ERROR "Test fail: HAS_COMPILER_FLAG: ${COMPILER_FLAG}") endif() |