diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-07-29 17:33:55 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2019-08-30 18:39:32 (GMT) |
commit | 1353802af366bd64ba8f730e6f93d4c416107d48 (patch) | |
tree | c721c50d768012fc631160aad6de8e51a19d029a /Tests/RunCMake/UnityBuild/unitybuild_c.cmake | |
parent | 8dfeb5d278625c55be1cc82399d29c0305ee4438 (diff) | |
download | CMake-1353802af366bd64ba8f730e6f93d4c416107d48.zip CMake-1353802af366bd64ba8f730e6f93d4c416107d48.tar.gz CMake-1353802af366bd64ba8f730e6f93d4c416107d48.tar.bz2 |
Unity build: Add unit tests
Diffstat (limited to 'Tests/RunCMake/UnityBuild/unitybuild_c.cmake')
-rw-r--r-- | Tests/RunCMake/UnityBuild/unitybuild_c.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c.cmake new file mode 100644 index 0000000..77a09cb --- /dev/null +++ b/Tests/RunCMake/UnityBuild/unitybuild_c.cmake @@ -0,0 +1,12 @@ +project(unitybuild_c C) + +set(srcs "") +foreach(s RANGE 1 8) + set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c") + file(WRITE "${src}" "int s${s}(void) { return 0; }\n") + list(APPEND srcs "${src}") +endforeach() + +add_library(tgt SHARED ${srcs}) + +set_target_properties(tgt PROPERTIES UNITY_BUILD ON) |