Fix CMakeLists.txt
This commit is contained in:
parent
fb0cb84c3c
commit
8ebaac0536
3 changed files with 14 additions and 8 deletions
|
@ -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)
|
||||
|
|
8
src/CMakeLists.txt
Normal file
8
src/CMakeLists.txt
Normal file
|
@ -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)
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue