Use “MATCHES” instead of “STREQUAL” to avoid ambiguous comparison.

NOTE: Unlike STREQUAL this comparison is supported pre and post CMake v3.1.0
This commit is contained in:
Gabriel Hare 2016-12-15 02:50:09 -08:00
parent bb49539107
commit a2fe23887a

View file

@ -11,7 +11,7 @@ option(UTPP_AMPLIFY_WARNINGS
"Set this to OFF if you wish to use CMake default warning levels; should generally only use to work around support issues for your specific compiler"
ON)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
if(${CMAKE_CXX_COMPILER_ID} MATCHES "MSVC")
# CHECK_CXX_COMPILER_FLAG could be used
# but MSVC version is preferred for feature requirements
if (MSVC14 OR MSVC12)