[CMake] why the change in CMAKE_CXX_COMPILER for Visual Studio since 2.8.9?
Kathleen S. Biagas
biagas2 at llnl.gov
Thu Oct 3 18:17:19 EDT 2013
On Windows 7 (and 8), I use cmake-gui and this simple CMakeLists.txt
file:
cmake_minimum_required(VERSION 2.8)
project(MYTEST)
message("CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
I choose as a generator Visual Studio 11 Win 64 (I see the same results
with VS 10)
With cmake 2.8.9 and older, CMAKE_CXX_COMPILER is:
C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/amd64/cl.exe
But with 2.8.10 and newer it is:
C:/Program Files (x86)/Microsoft Visual Studio
11.0/VC/bin/x86_amd64/cl.exe
I noticed this because it caused a problem with my use of
CMakeDetermineVSServicePack (it fails to run).
If I choose the 64-bit compiler on my 64-bit OS, why is
CMAKE_CXX_COMPILER being set to the cross-tools version instead of the
64-bit specific version?
BTW, I always build a 64-bit version of cmake to use on my 64-bit
systems. But I get the same behavior whether I use the pre-built 32-bit
binary, or my 64-bit builds.
Kathleen
More information about the CMake
mailing list