[CMake] Issues setting CMAKE_VS_PLATFORM_TOOLSET

J Decker d3ck0r at gmail.com
Tue Sep 30 03:02:50 EDT 2014


I was recently trying to package some apps I was building, but ran into an
issue that they weren't compatible on XP.  ... I was setting
CMAKE_VS_PLATFORM_TOOLSET on the base SDK but that wasn't being relayed to
subsequent projects... so I fixed that, and the toolset still isn't being
set.

This is a clip from "cmake --trace ...."

I added a message() to log what the toolset was set to in
cmakedeterminecompilerid.cmake...  Even though it's set earlier to v110_xp,
when it uses the value later it is only 'v110'

I don't understand where it is getting reset... in the '....cut....'
section there are no references to that variable...
I'm using a nightly build  3.0.20140924-g8abd5 from about a week ago
-----------------------------------

Running with trace output on.
/General/Build/sack/debug_out/core/CMakePackage(7):  message(SET
CMAKE_VS_PLATFORM_TOOLSET )
SET CMAKE_VS_PLATFORM_TOOLSET
/General/Build/sack/debug_out/core/CMakePackage(8):
 set(CMAKE_VS_PLATFORM_TOOLSET v110_xp )
/General/Build/sack/debug_out/core/CMakePackage(9):
 add_definitions(-wd4996 )
/General/Build/sack/debug_out/core/CMakePackage(11):  enable_language(C )
.... cut....
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(142):
 set(id_platform ${CMAKE_VS_PLATFORM_NAME} )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(143):
 set(id_lang ${lang} )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(144):
 set(id_cl cl.exe )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(145):
 if(CMAKE_VS_PLATFORM_NAME STREQUAL Tegra-Android )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(155):
 elseif(lang STREQUAL Fortran )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(159):
 elseif(NOT ${vs_version} VERSION_LESS 10 )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(160):
 set(v 10 )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(161):
 set(ext vcxproj )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(170):
 if(${id_platform} STREQUAL Itanium )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(173):
 message(CMAKE_VS_PLATFORM_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET} )
CMAKE_VS_PLATFORM_TOOLSET v110
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(174):
 if(CMAKE_VS_PLATFORM_TOOLSET )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(175):
 if(CMAKE_VS_PLATFORM_NAME STREQUAL Tegra-Android )
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(177):
 else()
c:/tools/unix/cmake/share/cmake-3.0/Modules/CMakeDetermineCompilerId.cmake(178):
 set(id_toolset
<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset> )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140930/fdd50052/attachment.html>


More information about the CMake mailing list