Tweak cmake commands
This commit is contained in:
parent
7bd0d0ed2b
commit
6cd15183e8
|
@ -7,14 +7,12 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
add_compile_options(-Weverything -pedantic -Wno-padded -Wno-disabled-macro-expansion)
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
OPTION(CMAKE_BUILD_TYPE "Debug")
|
||||
|
||||
if (CMAKE_BUILD_TYPE EQUAL "Debug")
|
||||
set(COMPILE_OPTIONS "${COMPILE_OPTIONS} -Og")
|
||||
add_compile_options(-Og)
|
||||
elseif (CMAKE_BUILD_TYPE EQUAL "Release")
|
||||
set(COMPILE_OPTIONS "${COMPILE_OPTIONS} -O2 -Werror")
|
||||
add_compile_options(-O2 -Werror)
|
||||
endif()
|
||||
|
||||
add_executable(uircd
|
||||
|
@ -23,6 +21,7 @@ add_executable(uircd
|
|||
src/filesystem.c
|
||||
src/misc.c
|
||||
)
|
||||
|
||||
find_library(UIRC_PATH NAMES uirc libuirc REQUIRED)
|
||||
target_link_libraries(uircd ${UIRC_PATH})
|
||||
set_property(TARGET uircd PROPERTY C_STANDARD 99)
|
||||
|
|
Reference in New Issue