File: CMakeLists.txt

package info (click to toggle)
bear 3.1.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,904 kB
  • sloc: cpp: 9,184; sh: 706; ansic: 497; python: 175; makefile: 29
file content (20 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
add_library(shell_a OBJECT)
target_include_directories(shell_a PUBLIC include/)
target_sources(shell_a
        PRIVATE
            source/Command.cc
        INTERFACE
            $<TARGET_OBJECTS:shell_a>
        )
target_link_libraries(shell_a PUBLIC result_a)

if (ENABLE_UNIT_TESTS)
    add_executable(shell_unit_test
            test/CommandTest.cc
            )

    target_link_libraries(shell_unit_test shell_a)
    target_link_libraries(shell_unit_test PkgConfig::GTest ${CMAKE_THREAD_LIBS_INIT})

    add_test(NAME bear::shell_unit_test COMMAND $<TARGET_FILE:shell_unit_test>)
endif ()