dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
42 stars 18 forks source link

Compiler exports from setup.py script are not ccache friendly #149

Closed robertodr closed 8 years ago

robertodr commented 8 years ago

When using ccache to cache build information one has to export the C/C++ compiler as 'ccache compiler_name' Calling the setup.py script with this "dressed" compiler causes an error since it is not surrounded by apices.

  python setup.py --cxx='ccache g++'

results in

  CXX=ccache g++ CC=gcc FC=gfortran cmake -DEXTRA_CXXFLAGS="''" -DEXTRA_CFLAGS="''" -DEXTRA_FCFLAGS="''" -DENABLE_CODE_COVERAGE=False -DENABLE_64BIT_INTEGERS=False -DENABLE_OPENMP=False -DPYTHON_INTERPRETER="''" -DBOOST_INCLUDEDIR="''" -DBOOST_LIBRARYDIR="''" -DFORCE_CUSTOM_BOOST="OFF" -DCMAKE_BUILD_TYPE=release -G  "Unix Makefiles" /home/roberto/Workspace/robertodr/pcmsolver

 g++: error: CC=gcc: No such file or directory
 g++: error: FC=gfortran: No such file or directory
 g++: error: cmake: No such file or directory  
 g++: error: Unix Makefiles: No such file or directory 
 g++: error: unrecognized command line option ‘-G’
bast commented 8 years ago

ccache is cool. I can confirm this problem.