mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 22:58:41 +00:00
664591ce59
This is a dark corner of the Ninja generator. It should be fixed in the future, but add a test which shows its behaviors.
21 lines
718 B
CMake
21 lines
718 B
CMake
cmake_minimum_required(VERSION 3.8)
|
|
project(AssumedSources)
|
|
|
|
set_source_files_properties(
|
|
"${CMAKE_CURRENT_BINARY_DIR}/target.c"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/target-no-depends.c"
|
|
PROPERTIES GENERATED 1)
|
|
|
|
add_executable(working
|
|
"${CMAKE_CURRENT_BINARY_DIR}/target.c"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/target-no-depends.c")
|
|
|
|
add_custom_target(
|
|
gen-target.c ALL
|
|
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/dep.c" "${CMAKE_CURRENT_BINARY_DIR}/target.c")
|
|
add_custom_target(
|
|
gen-target-no-depends.c ALL
|
|
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/dep.c" "${CMAKE_CURRENT_BINARY_DIR}/target-no-depends.c")
|
|
|
|
add_dependencies(working gen-target.c)
|