blob: abf672df0132e5d885bc8164d2c0c47d39ea7c43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
project(unitybuild_cxx_relocatable_path CXX)
set(srcs "")
foreach(s RANGE 1 3)
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
UNITY_BUILD_RELOCATABLE TRUE)
|