[CMake] Does CMake 3.3.1 ignore CXX env variable on OSX10.10?

Ben Morgan bmorgan.warwick at gmail.com
Tue Sep 22 08:02:55 EDT 2015


Hi Pere,

> On 22 Sep 2015, at 11:18, Pere Mato Vila <Pere.Mato at cern.ch> wrote:
> 
> Hi,
> 
>   On previous versions I was setting the variables CC and CXX to force the compiler. This is not working anymore. Is this intended?
>   Cheers,
> 

I think it *is* honouring CC/CXX, but from CMake 3.2 (?) the full path to the actual compiler is resolved to
ensure the same compiler is used at build time. This is the relevant commit:

https://github.com/Kitware/CMake/commit/1f085e11e40a20f8e8702da7920e950e47deb27c

Cheers,

Ben.


> Pere
> ———————
> macitois13:test sftnight$ cmake --version
> cmake version 3.3.1
> 
> CMake suite maintained and supported by Kitware (kitware.com/cmake <http://kitware.com/cmake>).
> macitois13:test sftnight$ echo $CXX
> /usr/bin/clang++
> macitois13:test sftnight$ cmake .
> -- The CXX compiler identification is AppleClang 6.1.0.6020053
> -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
> -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> CMAKE_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/test
> 
> 
> 
> -------------------------------------------------------------
> Pere Mato  CERN, PH Department, CH 1211 Geneva 23, Switzerland
> e-mail: pere.mato at cern.ch <mailto:pere.mato at cern.ch>
> tel:   +41 22 76 78696
> fax:  +41 22 76 68792
> gsm: +41 75 41 10855
> 
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake

-- 
==================
Dr. Ben Morgan
Senior Research Fellow
Department of Physics
University of Warwick
Coventry CV4 7AL
==================



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150922/c6732064/attachment-0001.html>


More information about the CMake mailing list