MantisBT - CMake | |||||||||||||||
View Issue Details | |||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
0015216 | CMake | CMake | public | 2014-10-22 09:44 | 2016-06-10 14:31 | ||||||||||
Reporter | Joseph Lisee | ||||||||||||||
Assigned To | Kitware Robot | ||||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||||
Status | closed | Resolution | moved | ||||||||||||
Platform | Linux | OS | Ubuntu | OS Version | 12.04 | ||||||||||
Product Version | CMake 3.0.2 | ||||||||||||||
Target Version | Fixed in Version | ||||||||||||||
Summary | 0015216: Ninja makes bad phony targets with parallel "sub" directory and custom CMAKE_LIBRARY_OUTPUT_DIRECTORY | ||||||||||||||
Description | I have project where the main build directory is on the same level as some "sub" directories, for example: primary/CMakeLists.txt secondary/CMakeLists.txt primary/build/<CMake generated files> When I use the CMAKE_LIBRARY_OUTPUT_DIRECTORY to put all the lib files into primary/lib the build fails with ninja but keeps working with Make. The ninja error: ninja: error: '../lib/libtestlib.so', needed by 'CMakeFiles/main.dir/main.cpp.o', missing and no known rule to make it Inside build.ninja the library is being built with the absolute path "/tmp/ninja-parallel-sub-test/primary/lib/libtestlib.so" while other places refer to it as "../lib/libtestlib.so". Adding the following phony rule fixes the error: build ../lib/libtestlib.so: phony /tmp/ninja-parallel-sub-test/primary/lib/libtestlib.so | ||||||||||||||
Steps To Reproduce | Steps: * unzip attached zip files * cd primary * mkdir build * cmake .. -G Ninja * ninja Switching to Make will result in primary/bin/main and primary/lib/libtestlib.so appearing properly. Make sure to clean up the primary/bin & primary/lib directory while switching build systems, if not done ninja will appear to work only because it's not trying to build the targets. | ||||||||||||||
Additional Information | This is broken with the latest git head fc9041d0249c113cb812d69ee0b8f1411f1eea15, CMake 3.0.2 and CMake 2.8.9. These bugs are related: 0014972, 0014414 | ||||||||||||||
Tags | No tags attached. | ||||||||||||||
Relationships |
| ||||||||||||||
Attached Files | ninja-parallel-sub-test.zip (1,768) 2014-10-22 09:44 https://public.kitware.com/Bug/file/5283/ninja-parallel-sub-test.zip | ||||||||||||||
Issue History | |||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||
2014-10-22 09:44 | Joseph Lisee | New Issue | |||||||||||||
2014-10-22 09:44 | Joseph Lisee | File Added: ninja-parallel-sub-test.zip | |||||||||||||
2014-10-22 10:24 | Brad King | Relationship added | related to 0014972 | ||||||||||||
2014-10-22 10:24 | Brad King | Relationship added | related to 0014414 | ||||||||||||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042649 | |||||||||||||
2016-06-10 14:29 | Kitware Robot | Status | new => 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 | |||||
|
|||||
|
|