diff options
author | Brad King <brad.king@kitware.com> | 2015-01-29 14:13:53 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-29 14:13:53 (GMT) |
commit | abec4213d61cb74aba5da6f83220b38ef7882209 (patch) | |
tree | deb91704649b5bfe0fcc2eac8ff12f2382578dea /Tests/CustomCommand/CMakeLists.txt | |
parent | 5968ad58fd85e9703c36cd9154137f24c55e5413 (diff) | |
parent | 9259d7788193ad23aa429652af983afc3bc4a953 (diff) | |
download | CMake-abec4213d61cb74aba5da6f83220b38ef7882209.zip CMake-abec4213d61cb74aba5da6f83220b38ef7882209.tar.gz CMake-abec4213d61cb74aba5da6f83220b38ef7882209.tar.bz2 |
Merge topic 'fix-OBJECT_DEPENDS-after-path-normalization'
9259d778 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
Diffstat (limited to 'Tests/CustomCommand/CMakeLists.txt')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 57ffeec..268069d 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -154,6 +154,19 @@ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/foo.c ${PROJECT_BINARY_DIR}/foo.c ) +# Test using OBJECT_DEPENDS to bring in a custom command. +# Use a path that can be simplified to make sure paths +# are consistently normalized. +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/subdir/../subdir/subdir.h + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/subdir.h.in + ${CMAKE_CURRENT_BINARY_DIR}/subdir/subdir.h + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/subdir.h.in + ) +set_property(SOURCE ${PROJECT_BINARY_DIR}/foo.c PROPERTY + OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/subdir/../subdir/subdir.h) + # Add custom command to generate not_included.h, which is a header # file that is not included by any source in this project. This will # test whether all custom command outputs explicitly listed as sources |