parent
b71943bca4
commit
be11404bce
@ -1,5 +1,5 @@
|
|||||||
# CMake version number components.
|
# CMake version number components.
|
||||||
set(CMake_VERSION_MAJOR 3)
|
set(CMake_VERSION_MAJOR 3)
|
||||||
set(CMake_VERSION_MINOR 5)
|
set(CMake_VERSION_MINOR 5)
|
||||||
set(CMake_VERSION_PATCH 1)
|
set(CMake_VERSION_PATCH 2)
|
||||||
#set(CMake_VERSION_RC 0)
|
#set(CMake_VERSION_RC 0)
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
|
||||||
add_library(tgt STATIC empty.cpp)
|
add_library(tgt STATIC empty.cpp)
|
||||||
add_library(Sub::tgt ALIAS tgt)
|
add_library(Sub::tgt ALIAS tgt)
|
||||||
|
|
||||||
|
# foo comes from the top-level CMakeLists.txt
|
||||||
|
add_library(Top::foo ALIAS foo)
|
||||||
|
get_target_property(some_prop Top::foo SOME_PROP)
|
||||||
|
target_link_libraries(tgt Top::foo)
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
add_custom_command(
|
||||||
|
OUTPUT gen-byproduct gen-byproduct-stamp
|
||||||
|
BYPRODUCTS byproduct
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E touch gen-byproduct-stamp
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different gen-byproduct-stamp byproduct
|
||||||
|
)
|
||||||
|
set_property(SOURCE gen-byproduct PROPERTY SYMBOLIC 1)
|
||||||
|
add_custom_target(produce DEPENDS gen-byproduct)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT use-byproduct
|
||||||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/byproduct
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E touch use-byproduct
|
||||||
|
)
|
||||||
|
add_custom_target(drive ALL DEPENDS use-byproduct)
|
||||||
|
add_dependencies(drive produce)
|
||||||
|
|
||||||
|
file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
|
||||||
|
if (check_step EQUAL 1)
|
||||||
|
set(check_pairs
|
||||||
|
\"${CMAKE_CURRENT_BINARY_DIR}/use-byproduct|${CMAKE_CURRENT_BINARY_DIR}/gen-byproduct-stamp\"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(check_pairs
|
||||||
|
\"${CMAKE_CURRENT_BINARY_DIR}/gen-byproduct-stamp|${CMAKE_CURRENT_BINARY_DIR}/use-byproduct\"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
")
|
Loading…
Reference in new issue