CMake: Disable compiler specific extensions
This commit is contained in:
parent
f068939e35
commit
c263958d3b
|
@ -2,6 +2,11 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
project(ecg_tree)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
# Disable compiler specific extensions
|
||||
# On GNU this has the effect of passing -std=c++11 instead of -std=gnu++11
|
||||
set(CMAKE_CXX_EXTENSIONS no)
|
||||
|
||||
add_library(tree node.cpp)
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main tree)
|
||||
|
|
Reference in a new issue