summaryrefslogtreecommitdiff
path: root/compiler/kuma/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/kuma/CMakeLists.txt')
-rw-r--r--compiler/kuma/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/kuma/CMakeLists.txt b/compiler/kuma/CMakeLists.txt
new file mode 100644
index 000000000..e705bfedb
--- /dev/null
+++ b/compiler/kuma/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(kuma STATIC ${SOURCES})
+set_target_properties(kuma PROPERTIES POSITION_INDEPENDENT_CODE ON)
+target_include_directories(kuma PUBLIC include)
+target_link_libraries(kuma PRIVATE nncc_common)
+target_link_libraries(kuma 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(kuma_test ${TESTS})
+target_link_libraries(kuma_test kuma)