MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0015682 | CMake | CMake | public | 2015-08-05 02:33 | 2016-06-10 14:31 |
| Reporter | Sam Spilsbury | ||||
| Assigned To | Kitware Robot | ||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | Apple Mac | OS | OS X | OS Version | 10.4.10 |
| Product Version | CMake 3.3 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0015682: [biicode] Ninja generator uses relative paths in target description when including parent directory | ||||
| Description | This is the typical directory tree that biicode uses: CMakeLists.txt - bii | - cmake | - biicode.cmake - CMakeLists.txt - build - bin - lib Biicode starts from bii/cmake/CMakeLists.txt which includes bii/cmake/biicode.cmake which then adds the top-level CMakeLists.txt as a subdirectory. bin and lib are set to CMAKE_RUNTIME_OUTPUT_DIRECTORY and CMAKE_ARCHIVE_OUTPUT_DIRECTORY respectively. When using the ninja generator with this layout, relative paths are inserted into the build.ninja file, for example: ############################################# # Link the executable ../../bin/main build ../../bin/main: C_EXECUTABLE_LINKER build_dir/CMakeFiles/main.dir/main.c.o POST_BUILD = : PRE_LINK = : TARGET_PDB = main.dbg # ============================================================================= # Target aliases. However, the all target specifies the absolute path to the output file: ############################################# # The main all target. build all: phony /Users/smspillaz/Source/polysquare/cmake-ninja-test/bin/main Which causes ninja to fail: ninja: error: '/Users/smspillaz/Source/polysquare/cmake-ninja-test/bin/main', needed by 'all', missing and no known rule to make it | ||||
| Steps To Reproduce | Tarball of reduced testcase included. $ cd bii/ $ mkdir build $ cd build/ $ cmake ../cmake -G $ ninja | ||||
| Additional Information | Granted, this is a strange build configuration, however biicode uses it and it doesn't appear to me that there is any other way of doing what they want to do without breaking their interface. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://public.kitware.com/Bug/file/5502/cmake-ninja-test.tar.gz | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2015-08-05 02:33 | Sam Spilsbury | New Issue | |||
| 2015-08-05 02:33 | Sam Spilsbury | File Added: cmake-ninja-test.tar.gz | |||
| 2016-06-10 14:29 | Kitware Robot | Note Added: 0042816 | |||
| 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 | |||||
|
|
|||||
|
|
||||