MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0004017 | CMake | CMake | public | 2006-11-02 21:51 | 2016-06-10 14:30 |
| Reporter | Craig Ringer | ||||
| Assigned To | Brad King | ||||
| Priority | low | Severity | major | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0004017: CMake doesn't handle flags with = in them passed as command line -DCMAKE_CXX_FLAGS | ||||
| Description | CMake does not handle compiler flags with an equals sign in them when they're passed on the command line with -DCMAKE_CXX_FLAGS . The entire argument gets silently ignored. For example: cmake -G "Unix Makefiles" ../podofo \ -DCMAKE_CXX_FLAGS=" -O2 -DBLAHBLAH " (just as an example) works fine, and `make VERBOSE=1' shows them being passed, but: cmake -G "Unix Makefiles" ../podofo \ -DCMAKE_CXX_FLAGS=" -O2 -DBLAHBLAH -march=athlon-xp -mfpmath=sse,387 -fvisibility=hidden" ... causes the entire set of flags, including those deemed valid before, to be ignored. This happens in at least CMake 2.4-patch3 and 2.5-20061102 . Any set of flags with an = in it seems to cause problems, even: -DCMAKE_CXX_FLAGS=" -DFLAGTEST=1 " Setting them with: SET(CMAKE_CXX_FLAGS " ... ") in the CMakeLists file causes them to be output on the command line, however it appears to prevent CMake from adding any target-specific COMPILE_FLAGS, the include path, etc, causing the build to fail. It would be helpful if the documentation described things like the right way to send additional flags to the build process. In any case, this issue is more likely an argument parsing bug, probably confusion between the = separating the cmake var from the argument and = signs in the argument its self. | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2012-08-13 10:44 | Brad King | Status | assigned => backlog | ||
| 2012-08-13 10:44 | Brad King | Note Added: 0030565 | |||
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041329 | |||
| 2016-06-10 14:27 | Kitware Robot | Status | backlog => resolved | ||
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:30 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||