MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014721 | CMake | CMake | public | 2014-01-27 11:00 | 2016-06-10 14:31 |
Reporter | Andreas Mohr | ||||
Assigned To | Robert Maynard | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | PC | OS | Linux | OS Version | Ubuntu LTS12.04 |
Product Version | CMake 2.8.12.1 | ||||
Target Version | Fixed in Version | ||||
Summary | 0014721: Ninja: warning message related to WriteUnknownExplicitDependencies() for CMakeCache.txt: file entry simply not supported yet?? | ||||
Description | See minimal test case below. amoh@lxamoh9010:~/cmake_tests/ninja_cmakecache_txt/build$ ninja ninja: warning: multiple rules generate CMakeCache.txt. builds involving this target will not be correct; continuing anyway ninja: no work to do. Ninja 1.4.0, using CMake trunk. | ||||
Steps To Reproduce | cmake_minimum_required(VERSION 2.8) project(ninja_cmakecache_txt C) # ...and add a default target to create a backup of CMakeCache.txt, # since that file might get destroyed too easily (at least CMake 2.6.4 # will kill it on out-of-disk-space, resulting in complete abort of # configuration run): if(NOT TARGET master_backup_CMakeCache) # CMAKE_CACHEFILE_DIR defined when cache already existing only... if(DEFINED CMAKE_CACHEFILE_DIR) # Better reference specific CMAKE_CACHEFILE_DIR variable (same as CMAKE_BINARY_DIR). # Unfortunately there's no CMake file name variable for "CMakeCache.txt" # (source code of CMake always open-codes that name), # thus there's nothing to reference here. set(CMakeCache_file "${CMAKE_CACHEFILE_DIR}/CMakeCache.txt") set(CMakeCache_file_backup "${CMakeCache_file}.backup") add_custom_command(OUTPUT "${CMakeCache_file_backup}" # copy_if_different _not_ needed (target dependency needs remaking? --> _do_ copy!) COMMAND "${CMAKE_COMMAND}" -E copy "${CMakeCache_file}" "${CMakeCache_file_backup}" DEPENDS "${CMakeCache_file}" COMMENT "creating CMakeCache backup (${CMakeCache_file_backup})" ) add_custom_target(master_backup_CMakeCache ALL DEPENDS "${CMakeCache_file_backup}") endif(DEFINED CMAKE_CACHEFILE_DIR) endif(NOT TARGET master_backup_CMakeCache) file(WRITE test1.c "int main() { return 1; }") add_library(test1 SHARED test1.c) | ||||
Additional Information | WriteUnknownExplicitDependencies() seems to be the function responsible for creating/filtering out these parts. Manually removing the part # ============================================================================= # Unknown Build Time Dependencies. # Tell Ninja that they may appear as side effects of build rules # otherwise ordered by order-only dependencies. build CMakeCache.txt: phony CMakeCache.txt from build.ninja makes the warning message go away, in fact. So tell me that WriteUnknownExplicitDependencies() handling simply failed to have CMakeCache.txt listed as a build-environment-related file? Or perhaps my sample is completely invalid since there might be a problem? (read: "I don't know what I'm doing here" :) Thanks, Andreas Mohr | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-01-27 11:00 | Andreas Mohr | New Issue | |||
2014-01-27 11:08 | Brad King | Assigned To | => Robert Maynard | ||
2014-01-27 11:08 | Brad King | Status | new => assigned | ||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042470 | |||
2016-06-10 14:29 | Kitware Robot | Status | assigned => resolved | ||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|