diff options
author | Brad King <brad.king@kitware.com> | 2019-09-05 12:35:29 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-05 12:36:06 (GMT) |
commit | ac4d6d4a9d9b81773e61c643169cb2afe1bab644 (patch) | |
tree | 7679958f3ffece7ae00993fa7c26c70d9b6a1dc2 /Tests/RunCMake/UnityBuild/unitybuild_skip-check.cmake | |
parent | fcba9c3baa00631407f493f97afe7e9cd1b844a7 (diff) | |
parent | 7786a05c707dc5ffe9fdf7a6b468f56ed18c9e8a (diff) | |
download | CMake-ac4d6d4a9d9b81773e61c643169cb2afe1bab644.zip CMake-ac4d6d4a9d9b81773e61c643169cb2afe1bab644.tar.gz CMake-ac4d6d4a9d9b81773e61c643169cb2afe1bab644.tar.bz2 |
Merge topic 'unity-build'
7786a05c70 Unity build: Add XCode support
1353802af3 Unity build: Add unit tests
8dfeb5d278 Unity build: Add support for Visual Studio generator
7114c141e2 Unity build: Add support for Ninja and Makefile generators
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com>
Acked-by: Evgeniy Dushistov <dushistov@mail.ru>
Acked-by: Viktor Kirilov <vik.kirilov@gmail.com>
Merge-request: !3611
Diffstat (limited to 'Tests/RunCMake/UnityBuild/unitybuild_skip-check.cmake')
-rw-r--r-- | Tests/RunCMake/UnityBuild/unitybuild_skip-check.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_skip-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_skip-check.cmake new file mode 100644 index 0000000..fdd45bc --- /dev/null +++ b/Tests/RunCMake/UnityBuild/unitybuild_skip-check.cmake @@ -0,0 +1,14 @@ +set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0.c") +file(STRINGS ${unitybuild_c} unitybuild_c_strings) + +string(REGEX MATCH "\\/s[1-6].c" matched_files_1_6 ${unitybuild_c_strings}) +if(matched_files_1_6) + set(RunCMake_TEST_FAILED "Generated unity contains s1.c -> s6.c which should have been skipped") + return() +endif() + +string(REGEX MATCH "\\/s[7-8].c" matched_files_7_8 ${unitybuild_c_strings}) +if(NOT matched_files_7_8) + set(RunCMake_TEST_FAILED "Generated unity should have contained s7.c, s8.c!") + return() +endif() |