diff --git a/CMakeLists.txt b/CMakeLists.txt index b702e44..546b7ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,9 +28,10 @@ option(EXAMPLES "Install examples" ON) option(MANPAGES "Install manpages" ON) option(BUILD_DRIVER "Build the orch(1) driver" ON) +set(warnings "-Wall -Wextra -Werror") if(CMAKE_BUILD_TYPE STREQUAL "Debug") - add_compile_options(-fsanitize=address) - add_link_options(-fsanitize=address) + add_compile_options(-fsanitize=address,undefined -fstrict-aliasing) + add_link_options(-fsanitize=address,undefined -fstrict-aliasing) endif() if(EXAMPLES) diff --git a/lib/core/CMakeLists.txt b/lib/core/CMakeLists.txt index c1c24ed..b03af5f 100644 --- a/lib/core/CMakeLists.txt +++ b/lib/core/CMakeLists.txt @@ -1,7 +1,6 @@ file(GLOB core_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c) -set(warnings "-Wall -Wextra -Werror") if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") add_compile_options(-D_GNU_SOURCE) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 70017d4..9b912b4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,6 @@ file(GLOB orch_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c) -set(warnings "-Wall -Wextra -Werror") add_compile_definitions(ORCHLUA_PATH="${ORCHLUA_PATH}") add_executable(orch ${orch_SOURCES})