Skip to content
Snippets Groups Projects
Commit 87be96d9 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

Clang does not support -Wl,--no-undefined

parent 6f5b41d6
No related branches found
No related tags found
1 merge request!3Resolve "Add macOS compatibility"
Pipeline #2018 failed with stages
in 1 second
This commit is part of merge request !3. Comments created here will be created in the context of that merge request.
...@@ -103,11 +103,19 @@ target_include_directories(alarm_handler ...@@ -103,11 +103,19 @@ target_include_directories(alarm_handler
"${PROJECT_BINARY_DIR}" "${PROJECT_BINARY_DIR}"
${Boost_INCLUDE_DIRS}) ${Boost_INCLUDE_DIRS})
set_target_properties(alarm_handler if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
PROPERTIES set_target_properties(alarm_handler
PROPERTIES
OUTPUT_NAME ${AH_NAME} OUTPUT_NAME ${AH_NAME}
LINK_FLAGS "-Wl,--no-undefined" LINK_FLAGS "-Wl,--no-undefined"
CXX_STANDARD 17) CXX_STANDARD 17)
else()
set_target_properties(alarm_handler
PROPERTIES
OUTPUT_NAME ${AH_NAME}
LINK_FLAGS ""
CXX_STANDARD 17)
endif()
if(DO_CLANG_TIDY) if(DO_CLANG_TIDY)
set_target_properties(alarm_handler set_target_properties(alarm_handler
......
...@@ -76,11 +76,19 @@ target_include_directories(testdevice ...@@ -76,11 +76,19 @@ target_include_directories(testdevice
"${PROJECT_BINARY_DIR}" "${PROJECT_BINARY_DIR}"
) )
set_target_properties(testdevice if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
PROPERTIES set_target_properties(testdevice
PROPERTIES
OUTPUT_NAME ${DEV_NAME} OUTPUT_NAME ${DEV_NAME}
LINK_FLAGS "-Wl,--no-undefined" LINK_FLAGS "-Wl,--no-undefined"
CXX_STANDARD 17) CXX_STANDARD 17)
else()
set_target_properties(testdevice
PROPERTIES
OUTPUT_NAME ${DEV_NAME}
LINK_FLAGS ""
CXX_STANDARD 17)
endif()
target_compile_options(testdevice target_compile_options(testdevice
PRIVATE "$<$<CONFIG:DEBUG>:-g>") PRIVATE "$<$<CONFIG:DEBUG>:-g>")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment