diff options
Diffstat (limited to 'Tests/RunCMake/UnityBuild/unitybuild_anon_ns-build-check.cmake')
-rw-r--r-- | Tests/RunCMake/UnityBuild/unitybuild_anon_ns-build-check.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_anon_ns-build-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_anon_ns-build-check.cmake new file mode 100644 index 0000000..746be32 --- /dev/null +++ b/Tests/RunCMake/UnityBuild/unitybuild_anon_ns-build-check.cmake @@ -0,0 +1,10 @@ +set(unitybuild_0 "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0_cxx.cxx") + +file(STRINGS ${unitybuild_0} src) + +foreach(expectedRegex IN ITEMS "SRC_f\\.cxx" "BLD_s1\\.cpp") + if(NOT "${src}" MATCHES "${expectedRegex}") + set(RunCMake_TEST_FAILED "Generated unity file doesn't have a match for expected unity ID regex ${expectedRegex}") + return() + endif() +endforeach() |