Skip to content

Commit

Permalink
Merge pull request #47594 from tchaikov/wip-cmake-win32
Browse files Browse the repository at this point in the history
cmake: enforce gcc-10 for win32 port

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
tchaikov authored Aug 16, 2022
2 parents e856368 + 6cdec0c commit 7e309f3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,15 @@ if(COMPILER_SUPPORTS_REDUNDANT_MOVE)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wredundant-move>)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11) # require >= gcc-11
message(FATAL_ERROR "C++20 support requires a minimum GCC version of 11.")
if(WIN32)
# require >= gcc-10 for compiling the windows port
set(minimum_gcc_version 10)
else()
# require >= gcc-11 for compiling the whole tree
set(minimum_gcc_version 11)
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS minimum_gcc_version)
message(FATAL_ERROR "C++20 support requires a minimum GCC version of ${minimum_gcc_version}.")
endif()
if(MINGW)
# The MINGW headers are missing some "const" qualifiers.
Expand Down

0 comments on commit 7e309f3

Please sign in to comment.