View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012392 | CMake | CCMake | public | 2011-08-08 03:55 | 2011-12-16 17:16 | ||||
Reporter | Axel Sander | ||||||||
Assigned To | Alex Neundorf | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.5 | ||||||||
Target Version | CMake 2.8.7 | Fixed in Version | CMake 2.8.7 | ||||||
Summary | 0012392: CMakeFindEclipseCDT4.cmake ignores CMAKE_CXX_COMPILER_ARG1 in compiler invocation | ||||||||
Description | While trying to find system include dirs, in the script CMakeFindEclipseCDT4.cmake the compile is called with: ... COMMAND ${_compilerExecutable} -v -E -P -x ${_lang} -dD dummy ... When using something like ccache or distcc these commands are called directly with the parameter above and complain about unknown options -v. In the lines: SET(_compilerExecutable "${CMAKE_CXX_COMPILER}"); and SET(_compilerExecutable "${CMAKE_C_COMPILER}"); the compiler arguments like ${CMAKE_CXX_COMPILER_ARG1}, ${CMAKE_C_COMPILER_ARG1}... are not used. | ||||||||
Steps To Reproduce | with: CC="ccache gcc" CXX="ccache g++" cmake -G "Eclipse CDT4 - Unix Makefiles" . the .cproject does not contain system includes. To view the problem use: MESSAGE(STATUS "gccOutput: ${_gccOutput}") MESSAGE(STATUS "gccStdout: ${_gccStdout}") after invocation of EXECUTE_PROCESS(COMMAND ${_compilerExecutable}...) | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0027177) Axel Sander (reporter) 2011-08-08 04:41 edited on: 2011-08-08 04:41 |
Probably not a good solution (have not written so much cmake code before), but working for the test cases I've here: Added the if block in the CXX part SET(_compilerExecutable "${CMAKE_CXX_COMPILER}") IF (NOT ("${CMAKE_CXX_COMPILER_ARG1}" STREQUAL "")) STRING(REGEX REPLACE "^ +" "" _compilerArg ${CMAKE_CXX_COMPILER_ARG1}) ENDIF (NOT ("${CMAKE_CXX_COMPILER_ARG1}" STREQUAL "")) and in the C part SET(_compilerExecutable "${CMAKE_C_COMPILER}") IF (NOT ("${CMAKE_CXX_COMPILER_ARG1}" STREQUAL "")) STRING(REGEX REPLACE "^ +" "" _compilerArg ${CMAKE_C_COMPILER_ARG1}) ENDIF (NOT ("${CMAKE_CXX_COMPILER_ARG1}" STREQUAL "")) and EXECUTE_PROCESS(COMMAND ${_compilerExecutable} ${_compilerArg} -v -E -P -x ${_lang} -dD dummy I'm not sure if there should be quotes like: EXECUTE_PROCESS(COMMAND "${_compilerExecutable}" "${_compilerArg}" -v -E -P -x ${_lang} -dD dummy |
(0027178) Axel Sander (reporter) 2011-08-08 05:43 |
In the .cproject file the runAction for the scanner does not get the arguments, either: <scannerInfoProvider id="specsFile"> <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="/usr/bin/ccache" useDefault="true"/> I did not find the source, where .cproject is generated, to analyse the problem further. |
(0027501) Alex Neundorf (developer) 2011-10-01 13:21 |
The sources are in Sources/cmExtraEclipseCTD4Generator.cxx. I committed a patch which should make this work for you (at least my tests were successful) to cmake stage (HandleCMAKE_CXX_COMPILER_ARG1InEclipse branch) and merged it into next. Hopefully it will still make it into 2.8.6. Alex |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-08-08 03:55 | Axel Sander | New Issue | |
2011-08-08 03:59 | Alex Neundorf | Assigned To | => Alex Neundorf |
2011-08-08 03:59 | Alex Neundorf | Status | new => assigned |
2011-08-08 04:41 | Axel Sander | Note Added: 0027177 | |
2011-08-08 04:41 | Axel Sander | Note Edited: 0027177 | |
2011-08-08 05:43 | Axel Sander | Note Added: 0027178 | |
2011-09-30 15:20 | Alex Neundorf | Relationship added | related to 0012223 |
2011-10-01 13:21 | Alex Neundorf | Note Added: 0027501 | |
2011-10-01 13:21 | Alex Neundorf | Status | assigned => closed |
2011-10-01 13:21 | Alex Neundorf | Resolution | open => fixed |
2011-12-16 17:16 | David Cole | Fixed in Version | => CMake 2.8.7 |
2011-12-16 17:16 | David Cole | Target Version | => CMake 2.8.7 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |