MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014017 | CMake | CMake | public | 2013-03-15 07:56 | 2016-06-10 14:31 |
Reporter | Sylwester Arabas | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | CMake 2.8.11 | ||||
Target Version | Fixed in Version | ||||
Summary | 0014017: Option -DCMAKE_<LANG>_COMPILER=... deletes cached settings even if given original value | ||||
Description | Hello, The commands listed below exemplify that one may get different behaviour of CMake when running: cmake . -DCMAKE_CXX_COMPILER=g++-4.7 -DCMAKE_BUILD_TYPE=Release and cmake . -DCMAKE_CXX_COMPILER=g++-4.7; cmake . -DCMAKE_BUILD_TYPE=Release HTH, Sylwester | ||||
Steps To Reproduce | $ cat CMakeLists.txt project(test CXX) set(CMAKE_CXX_FLAGS_RELEASE "-Ofaast") add_executable(test test.cpp) $ cat test.cpp int main() {} $ cmake . -DCMAKE_CXX_COMPILER=g++-4.7 -DCMAKE_BUILD_TYPE=Release -- Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_CXX_COMPILER= g++-4.7 -- The CXX compiler identification is GNU 4.7.2 -- Check for working CXX compiler: /usr/bin/g++-4.7 -- Check for working CXX compiler: /usr/bin/g++-4.7 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: /home/slayoo/Temp/cmake-test $ make Scanning dependencies of target test [100%] Building CXX object CMakeFiles/test.dir/test.cpp.o Linking CXX executable test [100%] Built target test $ cmake . -DCMAKE_CXX_COMPILER=g++-4.7; cmake . -DCMAKE_BUILD_TYPE=Release -- Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_CXX_COMPILER= g++-4.7 -- The CXX compiler identification is GNU 4.7.2 -- Check for working CXX compiler: /usr/bin/g++-4.7 -- Check for working CXX compiler: /usr/bin/g++-4.7 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: /home/slayoo/Temp/cmake-test -- Configuring done -- Generating done -- Build files have been written to: /home/slayoo/Temp/cmake-test $ make Scanning dependencies of target test [100%] Building CXX object CMakeFiles/test.dir/test.cpp.o cc1plus: error: argument to ‘-O’ should be a non-negative integer make[2]: *** [CMakeFiles/test.dir/test.cpp.o] Error 1 make[1]: *** [CMakeFiles/test.dir/all] Error 2 make: *** [all] Error 2 | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-03-15 07:56 | Sylwester Arabas | New Issue | |||
2013-03-15 08:22 | Brad King | Note Added: 0032638 | |||
2013-03-15 08:22 | Brad King | Status | new => resolved | ||
2013-03-15 08:22 | Brad King | Resolution | open => won't fix | ||
2013-03-16 19:41 | Brad King | Status | resolved => backlog | ||
2013-03-16 19:41 | Brad King | Resolution | won't fix => open | ||
2013-03-16 19:41 | Brad King | Product Version | CMake 2.8.9 => CMake 2.8.11 | ||
2013-03-16 19:41 | Brad King | Summary | -DCMAKE_BUILD_TYPE silently ignored if specified together with -DCMAKE_CXX_COMPILER => Option -DCMAKE_<LANG>_COMPILER=... deletes cached settings even if given original value | ||
2013-03-16 19:44 | Brad King | Note Edited: 0032638 | bug_revision_view_page.php?bugnote_id=32638#r1075 | ||
2013-03-16 19:50 | Brad King | Note Added: 0032650 | |||
2016-06-10 14:28 | Kitware Robot | Note Added: 0042249 | |||
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 | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|