MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014553 | CMake | CMake | public | 2013-11-08 11:07 | 2016-06-10 14:31 |
Reporter | Jan Rüegg | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | Arch Linux, 64-bit | OS | OS Version | ||
Product Version | CMake 2.8.12 | ||||
Target Version | Fixed in Version | ||||
Summary | 0014553: add_subdirectory fails when using Ninja generator | ||||
Description | This is the setup: ./folder1/CMakeLists.txt: cmake_minimum_required(VERSION 2.8) set(LIBRARY_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libs/") add_subdirectory(../folder2 ${CMAKE_CURRENT_BINARY_DIR}/folder2) ./folder2/CMakeLists.txt: project(foo) add_library(foo foo.cpp) ./folder2/foo.cpp: int main() {} | ||||
Steps To Reproduce | When I run cmake with the Unix Makefiles generator, everything works fine: ~/tmp/problem/folder1/build❯ cmake .. -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is GNU 4.8.2 ... -- Configuring done -- Generating done -- Build files have been written to: /home/jan/tmp/problem/folder1/build ~/tmp/problem/folder1/build❯ make Scanning dependencies of target foo [100%] Building CXX object folder2/CMakeFiles/foo.dir/foo.cpp.o Linking CXX static library /home/jan/tmp/problem/folder1/libs/libfoo.a [100%] Built target foo However, using the Ninja generator doesn't work: ~/tmp/problem/folder1/build❯ cmake -GNinja .. -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is GNU 4.8.2 ... -- Configuring done -- Generating done -- Build files have been written to: /home/jan/tmp/problem/folder1/build ~/tmp/problem/folder1/build❯ ninja ninja: error: '../libs/libfoo.a', needed by 'all', missing and no known rule to make it | ||||
Additional Information | ~/tmp/problem/folder1/build❯ ninja --version 1.4.0 ~/tmp/problem/folder1/build❯ cmake --version cmake version 2.8.12 | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | subdir.zip (907) 2013-11-26 06:18 https://public.kitware.com/Bug/file/4969/subdir.zip | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-11-08 11:07 | Jan Rüegg | New Issue | |||
2013-11-25 03:48 | Peter Kuemmel | Note Added: 0034539 | |||
2013-11-25 03:48 | Peter Kuemmel | Assigned To | => Peter Kuemmel | ||
2013-11-25 03:48 | Peter Kuemmel | Status | new => assigned | ||
2013-11-26 06:18 | Peter Kuemmel | File Added: subdir.zip | |||
2013-11-26 06:18 | Peter Kuemmel | Status | assigned => confirmed | ||
2013-11-26 06:18 | Peter Kuemmel | Note Deleted: 0034539 | |||
2014-02-10 09:18 | Jan Rüegg | Note Added: 0035061 | |||
2014-04-13 05:42 | Peter Kuemmel | Assigned To | Peter Kuemmel => | ||
2014-07-30 06:36 | Jan Rüegg | Note Added: 0036497 | |||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042415 | |||
2016-06-10 14:29 | Kitware Robot | Status | confirmed => resolved | ||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|