mirror of https://github.com/openXC7/prjxray.git
Use proper CMake mechanisms to set compiler settings
By setting CMAKE_CXX_STANDARD, CMake will figure out the right flag to pass to the compiler being used as well as error if the compiler doesn't support that standard. The standard can also be changed on a per-target basis. Using add_compiler_options() is just a bit cleaner syntactically and will apply the flags to C and C++. Signed-off-by: Rick Altherr <kc8apf@kc8apf.net> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
f65ee46f7c
commit
6a4402415e
|
|
@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.5.0)
|
|||
project(prjxray)
|
||||
option(PRJXRAY_BUILD_TESTING "" ON)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror ${CMAKE_CXX_FLAGS}" )
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
add_compile_options(-Wall -Werror)
|
||||
|
||||
# Hack for missing option in cctz
|
||||
option(BUILD_TESTING "" OFF)
|
||||
|
|
|
|||
Loading…
Reference in New Issue