# COMPILER variable
macro (OCCT_MAKE_COMPILER_SHORT_NAME)
if (MSVC)
- if (MSVC70)
+ if ((MSVC_VERSION EQUAL 1300) OR (MSVC_VERSION EQUAL 1310))
set (COMPILER vc7)
- elseif (MSVC80)
+ elseif (MSVC_VERSION EQUAL 1400)
set (COMPILER vc8)
- elseif (MSVC90)
+ elseif (MSVC_VERSION EQUAL 1500)
set (COMPILER vc9)
- elseif (MSVC10)
+ elseif (MSVC_VERSION EQUAL 1600)
set (COMPILER vc10)
- elseif (MSVC11)
+ elseif (MSVC_VERSION EQUAL 1700)
set (COMPILER vc11)
- elseif (MSVC12)
+ elseif (MSVC_VERSION EQUAL 1800)
set (COMPILER vc12)
- elseif (MSVC14)
+ elseif (MSVC_VERSION EQUAL 1900)
set (COMPILER vc14)
- elseif (MSVC15)
+ elseif ((MSVC_VERSION GREATER 1900) AND (MSVC_VERSION LESS 2000))
# Since Visual Studio 15 (2017), its version diverged from version of
# compiler which is 14.1; as that compiler uses the same run-time as 14.0,
# we keep its id as "vc14" to be compatibille
set (COMPILER vc14)
+ else()
+ message (FATAL_ERROR "Unrecognized MSVC_VERSION")
endif()
elseif (DEFINED CMAKE_COMPILER_IS_GNUCC)
set (COMPILER gcc)
# prior to version 3.3 not supporting per-configuration install paths
# for install target files (see https://cmake.org/Bug/view.php?id=14317)
macro (OCCT_UPDATE_TARGET_FILE)
- if (NOT SINGLE_GENERATOR)
+ if (WIN32)
OCCT_INSERT_CODE_FOR_TARGET ()
endif()