diff options
Diffstat (limited to 'compiler/pepper-strcast/CMakeLists.txt')
-rw-r--r-- | compiler/pepper-strcast/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/pepper-strcast/CMakeLists.txt b/compiler/pepper-strcast/CMakeLists.txt new file mode 100644 index 000000000..5f87e9488 --- /dev/null +++ b/compiler/pepper-strcast/CMakeLists.txt @@ -0,0 +1,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) |