summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/UnityBuild/unitybuild_cxx.cmake
blob: be800d7b16072c6d9bd7d16271cbe4f936bc867c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
project(unitybuild_cxx CXX)

set(srcs "")
foreach(s RANGE 1 8)
  set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.cxx")
  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)