summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-27 18:08:57 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-27 18:12:41 (GMT)
commitb204bae2613494a5ce779a4a7f9b000d84b8ab03 (patch)
treed85d13ddf14cede8062f78a09dd28900675403f9 /Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
parent4c82f309c59d02899145bc25c0e9efc91a6f64ed (diff)
downloadCMake-b204bae2613494a5ce779a4a7f9b000d84b8ab03.zip
CMake-b204bae2613494a5ce779a4a7f9b000d84b8ab03.tar.gz
CMake-b204bae2613494a5ce779a4a7f9b000d84b8ab03.tar.bz2
target_precompile_headers: Fix documented example using genex
When the path to a header file is specified using a generator expression, evaluation of the genex must produce an absolute path. Update our documented example and add a test covering the case. Fixes: #20617
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake')
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
index cc01ecb..9714bea 100644
--- a/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
@@ -13,14 +13,14 @@ endif()
file(STRINGS ${foobar_pch_h_header} foobar_pch_h_header_strings)
-if (NOT foobar_pch_h_header_strings MATCHES ";#include <stddef.h>(;|$)")
+if (NOT foobar_pch_h_header_strings MATCHES ";#include \"[^\"]*PrecompileHeaders/include/foo_C.h\";#include <stddef.h>(;|$)")
set(RunCMake_TEST_FAILED "Generated foo pch header\n ${foobar_pch_h_header}\nhas bad content:\n ${foobar_pch_h_header_strings}")
return()
endif()
file(STRINGS ${foobar_pch_hxx_header} foobar_pch_hxx_header_strings)
-if (NOT foobar_pch_hxx_header_strings MATCHES ";#include <cstddef>(;|$)")
+if (NOT foobar_pch_hxx_header_strings MATCHES ";#include \"[^\"]*PrecompileHeaders/include/foo_CXX.h\";#include <cstddef>(;|$)")
set(RunCMake_TEST_FAILED "Generated foo pch header\n ${foobar_pch_hxx_header}\nhas bad content:\n ${foobar_pch_hxx_header_strings}")
return()
endif()