Fixes for eci, binary div, upce, other

This commit is contained in:
gitlost
2019-09-01 20:23:15 +01:00
parent 89c2ee6f1d
commit d76cdd615b
11 changed files with 80 additions and 100 deletions

View File

@ -17,6 +17,9 @@ add_definitions (-DZINT_VERSION=\"${ZINT_VERSION}\" -Wall)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
set(ZINT_DEBUG FALSE CACHE BOOL "Set debug compile flag")
set(ZINT_SANITIZE FALSE CACHE BOOL "Set sanitize compile/link flags")
include (SetPaths.cmake)
INCLUDE (CheckCXXCompilerFlag)
@ -26,6 +29,15 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
if (CXX_COMPILER_FLAG_WALL)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif (CXX_COMPILER_FLAG_WALL)
if (ZINT_DEBUG)
add_compile_options("-g")
add_compile_options("-O0")
endif (ZINT_DEBUG)
if (ZINT_SANITIZE)
add_compile_options("-fsanitize=undefined")
add_compile_options("-fsanitize=address")
set (CMAKE_EXE_LINKER_FLAGS "-fsanitize=undefined -fsanitize=address")
endif (ZINT_SANITIZE)
endif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)