Hello,
I wonder if there is a reason why no MSVC15 variable is available for
Visual Studio 2017? I'm using those MSVCxx variables and
CMAKE_GENERATOR_TOOLSET to detect the active toolset:
# Visual Studio 2008
if((MSVC90 AND "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "") OR (CMAKE_GENERATOR_TOOLSET
MATCHES "v90"))
set(COL_BUILD_TOOLCHAIN)
elseif((MSVC11 AND "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "") OR
(CMAKE_GENERATOR_TOOLSET MATCHES "^v110.*"))
set(COL_BUILD_TOOLCHAIN _v110)
elseif((MSVC12 AND "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "") OR
(CMAKE_GENERATOR_TOOLSET MATCHES "^v120.*"))
set(COL_BUILD_TOOLCHAIN _v120)
elseif((MSVC14 AND "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "") OR
(CMAKE_GENERATOR_TOOLSET MATCHES "^v140.*"))
set(COL_BUILD_TOOLCHAIN _v140)
else()
message(FATAL_ERROR "Unknown Visual Studio version (${MSVC_VERSION}) or
generator toolset (${CMAKE_GENERATOR_TOOLSET})")
endif()
If I now select the Visual Studio 2017 compiler but omit the toolset on
the command line, the CMAKE_GENERATOR_TOOLSET is empty and MSVC15 is not
set. I wonder how I could detect the v141(_xp) toolset?
Thanks,
Gregor
--
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