diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-10-20 14:24:48 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-10-24 19:31:15 +0200 |
commit | fc57089bc509e63f9376858f8038b3efb142418a (patch) | |
tree | 95aecb38697dc6ac8ee62654e95ed85ef55a9a53 /test cases | |
parent | 1eb9d8ad6e30fb5381e720f50dcda9965e19a399 (diff) | |
download | meson-fc57089bc509e63f9376858f8038b3efb142418a.zip meson-fc57089bc509e63f9376858f8038b3efb142418a.tar.gz meson-fc57089bc509e63f9376858f8038b3efb142418a.tar.bz2 |
cmake: Disable the new (CMake 3.16) PCH support
Subprojects that use the CMake PCH feature will cause
compilation/linker errors. The CMake PCH support
should thus be disabled until this can be properly
translated to meson.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/cmake/1 basic/subprojects/cmMod/CMakeLists.txt | 6 | ||||
-rw-r--r-- | test cases/cmake/1 basic/subprojects/cmMod/cpp_pch.hpp | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test cases/cmake/1 basic/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/1 basic/subprojects/cmMod/CMakeLists.txt index 9c95636..2197667 100644 --- a/test cases/cmake/1 basic/subprojects/cmMod/CMakeLists.txt +++ b/test cases/cmake/1 basic/subprojects/cmMod/CMakeLists.txt @@ -10,5 +10,11 @@ add_definitions("-DDO_NOTHING_JUST_A_FLAG=1") add_library(cmModLib++ SHARED cmMod.cpp) target_compile_definitions(cmModLib++ PRIVATE MESON_MAGIC_FLAG=21) target_compile_definitions(cmModLib++ INTERFACE MESON_MAGIC_FLAG=42) + +# Test PCH support +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0") + target_precompile_headers(cmModLib++ PRIVATE "cpp_pch.hpp") +endif() + include(GenerateExportHeader) generate_export_header(cmModLib++) diff --git a/test cases/cmake/1 basic/subprojects/cmMod/cpp_pch.hpp b/test cases/cmake/1 basic/subprojects/cmMod/cpp_pch.hpp new file mode 100644 index 0000000..aa7ceb3 --- /dev/null +++ b/test cases/cmake/1 basic/subprojects/cmMod/cpp_pch.hpp @@ -0,0 +1,2 @@ +#include <vector> +#include <string> |