File: CMakeLists.txt

package info (click to toggle)
cppcheck 2.20.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,924 kB
  • sloc: cpp: 274,396; python: 22,429; ansic: 8,103; sh: 1,094; makefile: 1,041; xml: 987; cs: 291
file content (28 lines) | stat: -rw-r--r-- 1,433 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
add_executable(test-signalhandler
        test-signalhandler.cpp
        ${PROJECT_SOURCE_DIR}/cli/signalhandler.cpp
        ${PROJECT_SOURCE_DIR}/cli/stacktrace.cpp)
target_include_directories(test-signalhandler PRIVATE ${PROJECT_SOURCE_DIR}/cli ${PROJECT_SOURCE_DIR}/lib)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
    # names for static functions are omitted from trace
    target_compile_options_safe(test-signalhandler -Wno-missing-declarations)
    target_compile_options_safe(test-signalhandler -Wno-missing-prototypes)
    # required for backtrace() to produce function names
    if(NOT CMAKE_SYSTEM_NAME MATCHES AIX)
        target_link_options(test-signalhandler PRIVATE -rdynamic)
    endif()
endif()

add_executable(test-stacktrace
        test-stacktrace.cpp
        ${PROJECT_SOURCE_DIR}/cli/stacktrace.cpp)
target_include_directories(test-stacktrace PRIVATE ${PROJECT_SOURCE_DIR}/cli ${PROJECT_SOURCE_DIR}/lib)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
    # names for static functions are omitted from trace
    target_compile_options_safe(test-stacktrace -Wno-missing-declarations)
    target_compile_options_safe(test-stacktrace -Wno-missing-prototypes)
    # required for backtrace() to produce function names
    if(NOT CMAKE_SYSTEM_NAME MATCHES AIX)
        target_link_options(test-stacktrace PRIVATE -rdynamic)
    endif()
endif()