MantisBT - CMake
View Issue Details
0012470CMakeCMakepublic2011-09-19 22:022012-09-03 16:00
Flávio J. Saraiva 
Brad King 
normalblockhave not tried
closedno change required 
i386Debianwheezy
CMake 2.8.5 
 
0012470: CMAKE_C_COMPILER and CMAKE_CXX_COMPILER got stuck with bad values
While trying to fix some compilation problems, i tried to add --enable-sjlj-exceptions to CMAKE_C_COMPILER and CMAKE_CXX_COMPILER. This produced errors saying that the compiler was not found so i changed it back.

Somehow cmake got stuck with those values, which is preventing me from using cmake. Deleting the cache doesn't work.
Running cmake as console detects gcc and c++ properly, but running the generated makefiles gives the error "/usr/bin/c++ --enable-sjlj-exceptions: not found".
Running the GUI and selecting 'Configure' detects gcc and c++, but populates the cache with --enable-sjlj-exceptions.
Giving the correct CMAKE_C_COMPILER/CMAKE_CXX_COMPILER values as command line arguments or cache entries before 'Configure' produces the same result.


From where is it getting those values?
No tags attached.
Issue History
2011-09-19 22:02Flávio J. SaraivaNew Issue
2011-09-20 08:32Brad KingNote Added: 0027457
2012-03-16 13:33Flávio J. SaraivaNote Added: 0028922
2012-03-16 13:45Brad KingStatusnew => resolved
2012-03-16 13:45Brad KingResolutionopen => no change required
2012-03-16 13:45Brad KingAssigned To => Brad King
2012-09-03 16:00David ColeNote Added: 0030836
2012-09-03 16:00David ColeStatusresolved => closed

Notes
(0027457)
Brad King   
2011-09-20 08:32   
If you did an out-of-source build, as we recommend, then just wipe out the build tree and start a fresh one.

If you did an in-source build, use your version control tool to identify files in the source tree that might have been generated by CMake. In particular there will be "CMakeFiles" directories that can be wiped out. The one at the top contains some files that hold on to the compiler information.

If you want to add compilation flags, add them to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS.
(0028922)
Flávio J. Saraiva   
2012-03-16 13:33   
Tracked down the issue by outputing the value in various places and it was my fault. I forgot to delete a line added temporarily while testing.

Result: this was not a bug in cmake, sorry for the trouble =~~
(0030836)
David Cole   
2012-09-03 16:00   
Closing resolved issues that have not been updated in more than 4 months.