diff options
Diffstat (limited to 'Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake')
-rw-r--r-- | Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake new file mode 100644 index 0000000..533a89c --- /dev/null +++ b/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake @@ -0,0 +1,7 @@ +set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0.c") +file(STRINGS ${unitybuild_c} unitybuild_c_strings) +string(REGEX MATCH ".*#include.*s3.c.*#include.*s1.c.*#include.*s2.c.*" matched_code ${unitybuild_c_strings}) +if(NOT matched_code) + set(RunCMake_TEST_FAILED "Generated unity file doesn't include expected oder of source files") + return() +endif() |