mirror of https://github.com/openXC7/prjxray.git
When building with tests, turn off optimiations
Debugging failing tests is awful when optimizations are turned on. Signed-off-by: Rick Altherr <kc8apf@kc8apf.net> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
30a1e466d3
commit
62dd2f94a5
|
|
@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5.0)
|
||||||
project(prjxray)
|
project(prjxray)
|
||||||
option(PRJXRAY_BUILD_TESTING "" ON)
|
option(PRJXRAY_BUILD_TESTING "" ON)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror ${CMAKE_CXX_FLAGS} -O3" )
|
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror ${CMAKE_CXX_FLAGS}" )
|
||||||
|
|
||||||
# Hack for missing option in cctz
|
# Hack for missing option in cctz
|
||||||
option(BUILD_TESTING "" OFF)
|
option(BUILD_TESTING "" OFF)
|
||||||
|
|
@ -11,6 +11,9 @@ option(BUILD_TESTING "" OFF)
|
||||||
|
|
||||||
if(PRJXRAY_BUILD_TESTING)
|
if(PRJXRAY_BUILD_TESTING)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
add_compile_options(-O0 -g)
|
||||||
|
else()
|
||||||
|
add_compile_options(-O3)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(third_party/googletest EXCLUDE_FROM_ALL)
|
add_subdirectory(third_party/googletest EXCLUDE_FROM_ALL)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue