Skip to content

Commit 274e4e3

Browse files
Martin Poschtzlaine
authored andcommitted
Revert "avoid usage of CMAKE_CXX_COMPILER_FRONTEND_VARIANT and go with pre 3.14 version"
This reverts commit eab545e.
1 parent 9d3647d commit 274e4e3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
66

77
# Generated by `boostdep --cmake parser`
88

9-
cmake_minimum_required(VERSION 3.8...3.20)
9+
cmake_minimum_required(VERSION 3.14...3.20)
1010

1111
project(boost_parser VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
1212

@@ -30,7 +30,7 @@ endif()
3030

3131
else()
3232

33-
cmake_minimum_required(VERSION 3.8...3.20)
33+
cmake_minimum_required(VERSION 3.14...3.20)
3434
project(parse)
3535
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
3636

@@ -41,12 +41,12 @@ set(CXX_STD 17 CACHE STRING "Set to 14, 17, etc., to enable C++14, C++17, etc.")
4141
message("-- Using -std=c++${CXX_STD}")
4242

4343
# to just check the different frontend flavours we could use the following code
44-
if (MSVC)
44+
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
4545
get_filename_component(CNAME "${CMAKE_CXX_COMPILER}" NAME)
4646
message(STATUS "Detected MSVC style compiler frontend '" ${CNAME} "'")
4747
add_definitions(/W3)
4848
add_compile_options(/Zc:__cplusplus) # not sure, if it necessary for clang-cl
49-
else()
49+
elseif (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
5050
get_filename_component(CNAME "${CMAKE_CXX_COMPILER}" NAME)
5151
message(STATUS "Detected GNU style compiler frontend '" ${CNAME} "'")
5252
add_definitions(-Wall)

0 commit comments

Comments
 (0)