8000 Merge pull request #141 from Reification/feature-MSVC-Clang · unittest-cpp/unittest-cpp@8c460c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c460c4

Browse files
authored
Merge pull request #141 from Reification/feature-MSVC-Clang
Feature msvc clang
2 parents 65af507 + ee99616 commit 8c460c4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ option(UTPP_AMPLIFY_WARNINGS
1313

1414
set(LIB_SUFFIX "" CACHE STRING "Identifier to add to end of lib directory name e.g. 64 for lib64")
1515

16-
if(MSVC14 OR MSVC12)
17-
# has the support we need
16+
if(${CMAKE_CXX_COMPILER_ID} MATCHES "MSVC")
17+
# CHECK_CXX_COMPILER_FLAG could be used
18+
# but MSVC version is preferred for feature requirements
19+
if (MSVC14 OR MSVC12)
20+
# has the support we need
21+
else()
22+
message(STATUS "The MSVC compiler version does not support UnitTest++ C++11 features.")
23+
endif()
1824
else()
1925
include(CheckCXXCompilerFlag)
2026
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
@@ -24,7 +30,7 @@ else()
2430
elseif(COMPILER_SUPPORTS_CXX11)
2531
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
2632
else()
27-
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
33+
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
2834
endif()
2935
endif()
3036

0 commit comments

Comments
 (0)
0