Build: Use zm-* interfaces to set cxx standard and warning flags
This commit is contained in:
parent
00104b020c
commit
825ca07561
|
@ -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)
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
target_compile_options(zm-warning-interface
|
||||||
|
INTERFACE
|
||||||
|
-Wall)
|
|
@ -0,0 +1,3 @@
|
||||||
|
target_compile_options(zm-warning-interface
|
||||||
|
INTERFACE
|
||||||
|
-Wall)
|
Loading…
Reference in New Issue