summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/UnityBuild/unitybuild_object_library.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/UnityBuild/unitybuild_object_library.cmake')
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_object_library.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_object_library.cmake b/Tests/RunCMake/UnityBuild/unitybuild_object_library.cmake
new file mode 100644
index 0000000..b400517
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_object_library.cmake
@@ -0,0 +1,13 @@
+project(unitybuild_object_library C)
+
+set(CMAKE_UNITY_BUILD ON) # This tests that the variable works in addition to the property
+
+add_library(lib OBJECT func.c)
+
+add_library(other-lib STATIC func.c)
+
+add_executable(main main.c)
+target_link_libraries(main PRIVATE lib)
+
+enable_testing()
+add_test(NAME main COMMAND main)