blob: 5f87e948888045769eda3bfec2e13bdd64c3a852 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
file(GLOB_RECURSE SOURCES "src/*.cpp")
file(GLOB_RECURSE TESTS "src/*.test.cpp")
list(REMOVE_ITEM SOURCES ${TESTS})
add_library(pepper_strcast STATIC ${SOURCES})
set_target_properties(pepper_strcast PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(pepper_strcast PUBLIC include)
target_link_libraries(pepper_strcast PRIVATE nncc_common)
target_link_libraries(pepper_strcast PUBLIC nncc_coverage)
if(NOT ENABLE_TEST)
return()
endif(NOT ENABLE_TEST)
# Google Test is mandatory for test
nnas_find_package(GTest REQUIRED)
GTest_AddTest(pepper_strcast_test ${TESTS})
target_link_libraries(pepper_strcast_test pepper_strcast)
|