blob: f131751cd27ad9c9124458d99286cb73f8efb668 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
cmake_policy(SET CMP0116 NEW)
add_custom_command(
OUTPUT subcc.c
DEPFILE subcc.c.d
COMMAND ${CMAKE_COMMAND} -DOUTFILE=${CMAKE_CURRENT_BINARY_DIR}/subcc.c -DINFILE=subccdep.txt -DDEPFILE=subcc.c.d -P "${CMAKE_CURRENT_LIST_DIR}/../WriteDepfile.cmake"
)
add_custom_target(subcc ALL DEPENDS subcc.c)
add_custom_command(
OUTPUT subexe.c
DEPFILE subexe.c.d
COMMAND ${CMAKE_COMMAND} -DOUTFILE=subexe.c -DINFILE=subexedep.txt -DDEPFILE=subexe.c.d -P "${CMAKE_CURRENT_LIST_DIR}/../WriteDepfile.cmake"
)
add_executable(subexe subexe.c)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/../sublib.c
DEPFILE ${CMAKE_CURRENT_BINARY_DIR}/sublib.c.d
COMMAND ${CMAKE_COMMAND} -DOUTFILE=${CMAKE_BINARY_DIR}/../sublib.c "-DINFILE=${CMAKE_CURRENT_BINARY_DIR}/sublibdep.txt" -DDEPFILE=sublib.c.d -P "${CMAKE_CURRENT_LIST_DIR}/../WriteDepfile.cmake"
)
add_library(sublib STATIC "${CMAKE_BINARY_DIR}/../sublib.c")
|