diff options
author | Alexis Murzeau <amubtdx@outlook.fr> | 2016-10-23 16:58:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-24 14:30:02 (GMT) |
commit | e983bd326a9e3b7902d8f7cf0d891030ad3bd4c1 (patch) | |
tree | d19219a982ea8c6d7b648a29ecb2b73536bc3113 /Tests/RunCMake/Ninja/SubDirSource | |
parent | f660832999e086f02a9f3552c028aed900cd7249 (diff) | |
download | CMake-e983bd326a9e3b7902d8f7cf0d891030ad3bd4c1.zip CMake-e983bd326a9e3b7902d8f7cf0d891030ad3bd4c1.tar.gz CMake-e983bd326a9e3b7902d8f7cf0d891030ad3bd4c1.tar.bz2 |
Ninja: Use binary dir for `$subdir/all` targets
The targets added by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all`
targets, 2016-03-11) use as `$subdir` the relative path from the top of
the source tree to the current source directory. This is not correct
when using `add_subdirectory(test test_bin)`. Instead we need to use
the relative path from the top of the binary tree to the current binary
directory as was done for related targets by commit v3.7.0-rc1~268^2
(Ninja: Add `$subdir/{test,install,package}` targets, 2016-08-05).
Diffstat (limited to 'Tests/RunCMake/Ninja/SubDirSource')
-rw-r--r-- | Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt b/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt new file mode 100644 index 0000000..2664261 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt @@ -0,0 +1,6 @@ +add_custom_target(SubDirSourceFail COMMAND does_not_exist) +add_custom_target(SubDirSourceInAll ALL COMMAND ${CMAKE_COMMAND} -E echo "Building SubDirSourceInAll") +add_test(NAME SubDirSourceTest COMMAND ${CMAKE_COMMAND} -E echo "Running SubDirSourceTest") +install(CODE [[ + message(STATUS "Installing SubDirSource") +]]) |