diff options
author | Brad King <brad.king@kitware.com> | 2022-04-12 12:10:39 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-04-12 12:10:48 (GMT) |
commit | 1e1b31ac2584aff935dbaaf4e01526de38049c08 (patch) | |
tree | 7e4abba177c12ab95361c757135f53b32650825e /Tests/RunCMake/PrecompileHeaders | |
parent | 6cd0eefb85492911483da62efa77422508891115 (diff) | |
parent | 476c6a89109d9737715c74bf3458628b665c4c8d (diff) | |
download | CMake-1e1b31ac2584aff935dbaaf4e01526de38049c08.zip CMake-1e1b31ac2584aff935dbaaf4e01526de38049c08.tar.gz CMake-1e1b31ac2584aff935dbaaf4e01526de38049c08.tar.bz2 |
Merge topic 'xcode-pch'
476c6a8910 PCH: Fix Xcode non-pch language exclusion
fcf1fcfd0c Tests: Ignore all classes in Xcode internal objc warnings
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7166
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders')
-rw-r--r-- | Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake | 17 | ||||
-rw-r--r-- | Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake b/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake new file mode 100644 index 0000000..dd582ac --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.16) +project(PchIncludedAllLanguages C CXX) + +if(CMAKE_CXX_COMPILE_OPTIONS_USE_PCH) + add_definitions(-DHAVE_PCH_SUPPORT) +endif() + +add_executable(main + main.cpp + empty.c + pch-included.cpp +) + +target_precompile_headers(main PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/pch.h>) + +enable_testing() +add_test(NAME main COMMAND main) diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake index a7b3126..fd41e2f 100644 --- a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake +++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake @@ -30,4 +30,5 @@ if(RunCMake_GENERATOR MATCHES "Make|Ninja") endif() run_test(PchReuseFromObjLib) run_test(PchIncludedAllLanguages) +run_test(PchIncludedOneLanguage) run_test(PchLibObjLibExe) |