diff --git a/CMakeLists.txt b/CMakeLists.txt index bae4707..7f0c404 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,4 @@ enable_testing() add_subdirectory(src) add_subdirectory(tests) - -add_test(test_tree ${CMAKE_CURRENT_BINARY_DIR}/check_tree) - -add_executable(demo demo.c) +# add_test(test_tree ${CMAKE_CURRENT_BINARY_DIR}/check_tree) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..8a000e5 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,8 @@ +include_directories("${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}") +# install(TARGETS swiftnav-static DESTINATION lib${LIB_SUFFIX}) + +set(libr3_SRCS node.c edge.c list.c slug.c str.c token.c) +# add_library(r3 STATIC ${libr3_SRCS}) +add_library(r3 SHARED ${libr3_SRCS}) +# target_link_libraries(r3 cblas) +# install(FILES ${libswiftnav_HEADERS} DESTINATION include/libswiftnav) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7d8e226..b29c5d8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,6 @@ # set(TEST_LIBS ${TEST_LIBS} ${CHECK_LIBRARIES} judy libr3) # set(TEST_LIBS ${TEST_LIBS} ${CHECK_LIBRARIES} judy libr3) +include_directories("${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}") find_package(Check REQUIRED) find_package(PCRE REQUIRED) # find_package(Judy REQUIRED) @@ -11,13 +12,13 @@ else (NOT CHECK_FOUND) include_directories(${CHECK_INCLUDE_DIRS}) # include_directories("${PROJECT_SOURCE_DIR}/include/r2") - add_executable(test_r3 test_tree.c) - target_link_libraries(test_r3 ${TEST_LIBS}) + add_executable(check_tree check_tree.c) + target_link_libraries(check_tree ${TEST_LIBS}) add_custom_command( - TARGET test_r3 POST_BUILD + TARGET check_tree POST_BUILD COMMENT "Running unit tests" - COMMAND test_r3 + COMMAND check_tree ) endif (NOT CHECK_FOUND)