[cmake-developers] [CMake 0012274]: Got extra space in CMAKE_CXX_COMPILER_ARG1.

Mantis Bug Tracker mantis at public.kitware.com
Wed Jun 15 06:00:35 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=12274 
====================================================================== 
Reported By:                Takeshi Watanabe
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12274
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-06-15 06:00 EDT
Last Modified:              2011-06-15 06:00 EDT
====================================================================== 
Summary:                    Got extra space in CMAKE_CXX_COMPILER_ARG1.
Description: 
I wanted to use the same compiler used at cmake and I got this error.

Steps to Reproduce: 
My $CXX was "ccache clang++" and cmake split this into
- CMAKE_CXX_COMPILER="/opt/local/ccache"
- CMAKE_CXX_COMPILER_ARG1=" clang++"
And I did "add_custom_target(foo COMMAND ${CMAKE_CXX_COMPILER}
${CMAKE_CXX_COMPILER_ARG1} args...)" but it didn't work well.
As I tested the error was cause by the space in the ${CMAKE_CXX_COMPILER_ARG1}.
So I needed to do "string(REPLACE " " "" CMAKE_CXX_COMPILER_ARG1
${CMAKE_CXX_COMPILER_ARG1})".

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-06-15 06:00 Takeshi WatanabeNew Issue                                    
======================================================================




More information about the cmake-developers mailing list