Skip to content

Commit f058208

Browse files
committed
CMAKE: add error message if you are trying to build engine with gcc version less then 7.0
1 parent 8f721a8 commit f058208

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ if(CCACHE_FOUND)
1111
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
1212
endif(CCACHE_FOUND)
1313

14+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
15+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
16+
message(FATAL_ERROR "Building with a gcc version less than 7.0 is not supported.")
17+
endif()
18+
endif()
19+
1420
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17")
1521
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") This is for the future versions
1622
#set(CMAKE_CXX_STANDARD 14) #Otherwise adds -std=gnu++11 and breaks successful building

0 commit comments

Comments
 (0)