mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Fixes for eci, binary div, upce, other
This commit is contained in:
@ -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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user