fix special case
This commit is contained in:
parent
03569479b7
commit
bf02bf171f
@ -4,10 +4,12 @@ project(bsdtopo)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(LIBVER 1.1.0)
|
||||
set(LIBVER 1.1.1)
|
||||
|
||||
pkg_check_modules(XML libxml-2.0 REQUIRED)
|
||||
set(C_FLAGS -O2 -g -Wall -Wextra -Werror -Wpedantic -Wconversion -std=c17
|
||||
set(C_FLAGS -O3 -g -Wall -Wextra -Werror -Wpedantic -Wconversion -std=c17
|
||||
-march=native -DNDEBUG)
|
||||
set(C_FLAGS_DBG -Og -g -Wall -Wextra -Werror -Wpedantic -Wconversion -std=c17
|
||||
-march=native)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/inc)
|
||||
@ -17,10 +19,15 @@ target_compile_options(bsdtopo PRIVATE ${C_FLAGS} ${XML_CFLAGS})
|
||||
target_include_directories(bsdtopo PRIVATE ${XML_INCLUDE_DIRS})
|
||||
target_link_libraries(bsdtopo PRIVATE ${XML_LINK_LIBRARIES})
|
||||
|
||||
add_library(bsdtopo_debug SHARED topo.c timestamp.c)
|
||||
target_compile_options(bsdtopo_debug PRIVATE ${C_FLAGS_DBG} ${XML_CFLAGS})
|
||||
target_include_directories(bsdtopo_debug PRIVATE ${XML_INCLUDE_DIRS})
|
||||
target_link_libraries(bsdtopo_debug PRIVATE ${XML_LINK_LIBRARIES})
|
||||
|
||||
add_executable(test test/test.c)
|
||||
set_target_properties(test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test)
|
||||
target_link_libraries(test PRIVATE bsdtopo)
|
||||
target_compile_options(test PRIVATE ${C_FLAGS})
|
||||
target_link_libraries(test PRIVATE bsdtopo_debug)
|
||||
target_compile_options(test PRIVATE ${C_FLAGS_DBG})
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bsdtopo.pc.in
|
||||
|
Loading…
Reference in New Issue
Block a user