Build: Use zm-* interfaces to set cxx standard and warning flags

This commit is contained in:
Peter Keresztes Schmidt 2021-02-08 22:54:40 +01:00
parent 00104b020c
commit 825ca07561
3 changed files with 12 additions and 9 deletions

View File

@ -31,18 +31,15 @@ endif()
#set(CMAKE_VERBOSE_MAKEFILE ON) #set(CMAKE_VERBOSE_MAKEFILE ON)
#set(CMAKE_INSTALL_ALWAYS ON) #set(CMAKE_INSTALL_ALWAYS ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Default CLFAGS and CXXFLAGS: # Default CLFAGS and CXXFLAGS:
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2") set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2") set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_DEBUG "-Wall -g") set(CMAKE_C_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g") set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_C_FLAGS_OPTIMISED "-Wall -O3") set(CMAKE_C_FLAGS_OPTIMISED "-O3")
set(CMAKE_CXX_FLAGS_OPTIMISED "-Wall -O3") set(CMAKE_CXX_FLAGS_OPTIMISED "-O3")
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_CXX_STANDARD 11)
include(ConfigureBaseTargets) include(ConfigureBaseTargets)
include(CheckPlatform) include(CheckPlatform)

View File

@ -0,0 +1,3 @@
target_compile_options(zm-warning-interface
INTERFACE
-Wall)

View File

@ -0,0 +1,3 @@
target_compile_options(zm-warning-interface
INTERFACE
-Wall)