diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2020-01-07 12:40:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-09 16:35:23 (GMT) |
commit | a05b9d42392c2aaa07ec5ff693ecb9cd7a6598ac (patch) | |
tree | 2c9ef88b4fa8018a32b37e869cb79c783d14ff6a /Tests | |
parent | 6841059c12fbe8677b1f40d52420b679619f7d53 (diff) | |
download | CMake-a05b9d42392c2aaa07ec5ff693ecb9cd7a6598ac.zip CMake-a05b9d42392c2aaa07ec5ff693ecb9cd7a6598ac.tar.gz CMake-a05b9d42392c2aaa07ec5ff693ecb9cd7a6598ac.tar.bz2 |
ObjC: Add _COMPILE_LAUNCHER support
Fixes: #20178
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/OBJC-Build-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/OBJC-launch-Build-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/OBJC-launch.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/OBJC.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/OBJCXX-Build-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/OBJCXX-launch-Build-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/OBJCXX-launch.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/OBJCXX.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/main.m | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CompilerLauncher/main.mm | 4 |
12 files changed, 32 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 6b2f117..581a39e 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -530,6 +530,9 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") if(CMAKE_Fortran_COMPILER) list(APPEND CompilerLauncher_ARGS -DCMake_TEST_Fortran=1) endif() + if (APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang|GNU") + list(APPEND CompilerLauncher_ARGS -DCMake_TEST_OBJC=1) + endif() add_RunCMake_test(CompilerLauncher) add_RunCMake_test(ctest_labels_for_subprojects) endif() diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-Build-stdout.txt new file mode 100644 index 0000000..3313e31 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJC-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-launch-Build-stdout.txt new file mode 100644 index 0000000..3313e31 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJC-launch-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-launch.cmake b/Tests/RunCMake/CompilerLauncher/OBJC-launch.cmake new file mode 100644 index 0000000..43e8521 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJC-launch.cmake @@ -0,0 +1,3 @@ +set(CTEST_USE_LAUNCHERS 1) +include(CTestUseLaunchers) +include(OBJC.cmake) diff --git a/Tests/RunCMake/CompilerLauncher/OBJC.cmake b/Tests/RunCMake/CompilerLauncher/OBJC.cmake new file mode 100644 index 0000000..55c4493 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJC.cmake @@ -0,0 +1,4 @@ +enable_language(OBJC) +set(CMAKE_OBJC_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1") +set(CMAKE_VERBOSE_MAKEFILE TRUE) +add_executable(main main.m) diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-Build-stdout.txt new file mode 100644 index 0000000..3313e31 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-Build-stdout.txt new file mode 100644 index 0000000..3313e31 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-launch.cmake b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch.cmake new file mode 100644 index 0000000..5a54bff --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch.cmake @@ -0,0 +1,3 @@ +set(CTEST_USE_LAUNCHERS 1) +include(CTestUseLaunchers) +include(OBJCXX.cmake) diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX.cmake b/Tests/RunCMake/CompilerLauncher/OBJCXX.cmake new file mode 100644 index 0000000..e629603 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJCXX.cmake @@ -0,0 +1,4 @@ +enable_language(OBJCXX) +set(CMAKE_OBJCXX_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1") +set(CMAKE_VERBOSE_MAKEFILE TRUE) +add_executable(main main.mm) diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake index bb8da03..4420260 100644 --- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake @@ -22,6 +22,9 @@ endif() if(CMake_TEST_Fortran) list(APPEND langs Fortran) endif() +if(CMake_TEST_OBJC) + list(APPEND langs OBJC OBJCXX) +endif() foreach(lang ${langs}) run_compiler_launcher(${lang}) diff --git a/Tests/RunCMake/CompilerLauncher/main.m b/Tests/RunCMake/CompilerLauncher/main.m new file mode 100644 index 0000000..8488f4e --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/main.m @@ -0,0 +1,4 @@ +int main(void) +{ + return 0; +} diff --git a/Tests/RunCMake/CompilerLauncher/main.mm b/Tests/RunCMake/CompilerLauncher/main.mm new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/main.mm @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} |