Skip to content

Commit feef7df

Browse files
committed
compare MSVC version numerically with greater_equal
1 parent c7edc98 commit feef7df

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

cmake/externals/tbb/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ if (APPLE)
4848
LOG 1
4949
)
5050
elseif (WIN32)
51-
if ("${MSVC_VERSION}" EQUAL "1700")
52-
set(_TBB_MSVC_DIR "vc11")
53-
elseif ("${MSVC_VERSION}" EQUAL "1800")
54-
set(_TBB_MSVC_DIR "vc12")
55-
elseif ("${MSVC_VERSION}" EQUAL "1900" OR "${MSVC_VERSION}" EQUAL "1910")
51+
if (MSVC_VERSION GREATER_EQUAL 1900)
5652
set(_TBB_MSVC_DIR "vc14")
53+
elseif (MSVC_VERSION GREATER_EQUAL 1800)
54+
set(_TBB_MSVC_DIR "vc12")
55+
elseif (MSVC_VERSION GREATER_EQUAL 1700)
56+
set(_TBB_MSVC_DIR "vc11")
5757
else()
5858
message(FATAL_ERROR "MSVC ${MSVC_VERSION} not supported by Intel TBB")
5959
endif()

cmake/modules/FindTBB.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ elseif (WIN32)
5757
set(_TBB_ARCH_DIR "ia32")
5858
endif()
5959

60-
if ("${MSVC_VERSION}" EQUAL "1700")
61-
set(_TBB_MSVC_DIR "vc11")
62-
elseif ("${MSVC_VERSION}" EQUAL "1800")
63-
set(_TBB_MSVC_DIR "vc12")
64-
elseif ("${MSVC_VERSION}" EQUAL "1900" OR "${MSVC_VERSION}" EQUAL "1910")
60+
if (MSVC_VERSION GREATER_EQUAL 1900)
6561
set(_TBB_MSVC_DIR "vc14")
62+
elseif (MSVC_VERSION GREATER_EQUAL 1800)
63+
set(_TBB_MSVC_DIR "vc12")
64+
elseif (MSVC_VERSION GREATER_EQUAL 1700)
65+
set(_TBB_MSVC_DIR "vc11")
6666
else()
6767
message(FATAL_ERROR "MSVC ${MSVC_VERSION} not supported by Intel TBB")
6868
endif()

0 commit comments

Comments
 (0)