CMake: Disable compiler specific extensions

This commit is contained in:
Simon Bruder 2023-05-20 10:49:52 +02:00
parent f068939e35
commit c263958d3b

View file

@ -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)