CMake: Disable compiler specific extensions
parent
f068939e35
commit
c263958d3b
|
@ -2,6 +2,11 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
project(ecg_tree)
|
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_library(tree node.cpp)
|
||||||
add_executable(main main.cpp)
|
add_executable(main main.cpp)
|
||||||
target_link_libraries(main tree)
|
target_link_libraries(main tree)
|
||||||
|
|
Reference in New Issue