MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0010769 | CMake | CMake | public | 2010-05-27 17:46 | 2016-06-10 14:31 |
| Reporter | Ken Moreland | ||||
| Assigned To | Kitware Robot | ||||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | CMake-2-8 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0010769: CMAKE_SOURCE_DIR wrong in cache init scripts | ||||
| Description | When you use the -C command to load a cache init script, CMAKE_SOURCE_DIR is incorrectly set to the binary directory while that file is executed. As a demonstration consider the following shell output. Note the value for CMAKE_SOURCE_DIR is the binary directory in CacheInit.cmake. $ ls source CMakeLists.txt CacheInit.cmake $ cat source/CMakeLists.txt PROJECT(TMP NONE) MESSAGE("CMakeLists.txt CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}") MESSAGE("CMakeLists.txt CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") $ cat source/CacheInit.cmake MESSAGE("CacheInit.cmake CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}") MESSAGE("CacheInit.cmake CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") $ cd binary/ $ cmake --version cmake version 2.8.1 $ cmake -C ../source/CacheInit.cmake ../source loading initial cache file ../source/CacheInit.cmake CacheInit.cmake CMAKE_SOURCE_DIR: /Users/kmorel/tmp/binary CacheInit.cmake CMAKE_BINARY_DIR: /Users/kmorel/tmp/binary CMakeLists.txt CMAKE_SOURCE_DIR: /Users/kmorel/tmp/source CMakeLists.txt CMAKE_BINARY_DIR: /Users/kmorel/tmp/binary -- Configuring done -- Generating done -- Build files have been written to: /Users/kmorel/tmp/binary $ | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2010-05-27 17:46 | Ken Moreland | New Issue | |||
| 2010-12-14 18:41 | David Cole | Assigned To | => David Cole | ||
| 2010-12-14 18:41 | David Cole | Status | new => assigned | ||
| 2011-02-09 14:26 | David Cole | Status | assigned => backlog | ||
| 2011-02-09 15:08 | David Cole | Assigned To | David Cole => | ||
| 2014-04-14 04:29 | Paul M | Note Added: 0035687 | |||
| 2016-06-10 14:28 | Kitware Robot | Note Added: 0041705 | |||
| 2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved | ||
| 2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | ||
| 2016-06-10 14:31 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||