summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake')
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake13
1 files changed, 4 insertions, 9 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake
index cbd6ede..caeb22b 100644
--- a/Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake
@@ -18,19 +18,14 @@ endif()
file(STRINGS ${foo_pch_header} foo_pch_header_strings)
-if (NOT "#include \"foo.h\"" IN_LIST foo_pch_header_strings OR
- NOT "#include <stdio.h>" IN_LIST foo_pch_header_strings OR
- NOT "#include \"string.h\"" IN_LIST foo_pch_header_strings)
- set(RunCMake_TEST_FAILED "Generated foo pch header ${foo_pch_header} has bad content")
+if (NOT foo_pch_header_strings MATCHES ";#include \"[^\"]*PrecompileHeaders/include/foo.h\";#include \"foo2.h\";#include <stdio.h>;#include \"string.h\"(;|$)")
+ set(RunCMake_TEST_FAILED "Generated foo pch header\n ${foo_pch_header}\nhas bad content:\n ${foo_pch_header_strings}")
return()
endif()
file(STRINGS ${foobar_pch_header} foobar_pch_header_strings)
-if (NOT "#include \"foo.h\"" IN_LIST foobar_pch_header_strings OR
- NOT "#include <stdio.h>" IN_LIST foobar_pch_header_strings OR
- NOT "#include \"string.h\"" IN_LIST foobar_pch_header_strings OR
- NOT "#include \"bar.h\"" IN_LIST foobar_pch_header_strings)
- set(RunCMake_TEST_FAILED "Generated foobar pch header ${foobar_pch_header} has bad content")
+if (NOT foobar_pch_header_strings MATCHES ";#include \"[^\"]*PrecompileHeaders/include/foo.h\";#include \"foo2.h\";#include <stdio.h>;#include \"string.h\";#include \"[^\"]*PrecompileHeaders/include/bar.h\"(;|$)")
+ set(RunCMake_TEST_FAILED "Generated foobar pch header\n ${foobar_pch_header}\nhas bad content:\n ${foobar_pch_header_strings}")
return()
endif()