File: CMakeLists.txt

package info (click to toggle)
leatherman 1.4.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,944 kB
  • sloc: cpp: 14,555; python: 3,105; sh: 45; makefile: 9; ruby: 1
file content (22 lines) | stat: -rw-r--r-- 1,015 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
include_directories(BEFORE ${LEATHERMAN_CATCH_INCLUDE} ${LEATHERMAN_INCLUDE_DIRS})
add_executable(leatherman_test main.cc ${LEATHERMAN_TEST_SRCS})

if (LEATHERMAN_SHARED)
    # Include deps first, as they may be static. If they are, linking on Windows can
    # fail due to multiple definitions for the same symbol.
    set(LEATHERMAN_TEST_LIBS ${LEATHERMAN_DEPS} ${LEATHERMAN_LIBS})
else()
    set(LEATHERMAN_TEST_LIBS ${LEATHERMAN_LIBS} ${LEATHERMAN_DEPS})
endif()

if (LEATHERMAN_USE_CURL AND LEATHERMAN_INT_CURL_LIBS AND LEATHERMAN_TEST_CURL_LIB)
    list(REMOVE_ITEM LEATHERMAN_TEST_LIBS ${LEATHERMAN_INT_CURL_LIBS})
    list(APPEND LEATHERMAN_TEST_LIBS ${LEATHERMAN_TEST_CURL_LIB})
endif()

# We link libmock_curl instead of real libcurl in tests
target_link_libraries(leatherman_test ${LEATHERMAN_TEST_LIBS})

leatherman_logging_namespace("leatherman.test")
set_target_properties(leatherman_test PROPERTIES COMPILE_FLAGS "${LEATHERMAN_CXX_FLAGS}")
add_test(NAME "leatherman\\ tests" COMMAND leatherman_test)