提交 b0f070e0 编写于 作者: L liaogang

add cmake for majel

上级 5fc5707a
......@@ -9,6 +9,14 @@ add_subdirectory(pserver)
add_subdirectory(trainer)
add_subdirectory(scripts)
find_package(boost QUIET)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(majel)
endif()
if(WITH_C_API)
add_subdirectory(capi)
endif()
......
set(MAJEL_CXX_FILES place.cpp)
set(MAJEL_CUDA_FILES "")
if(CUDA_FOUND)
cuda_add_library(majel ${MAJEL_CUDA_FILES} ${MAJEL_CXX_FILES})
else()
add_library(majel ${MAJEL_CXX_FILES})
endif()
file(GLOB_RECURSE CHECK_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.cpp" "*.h")
add_style_check_target(majel ${CHECK_FILES})
if(WITH_TESTING)
add_subdirectory(test)
endif()
\ No newline at end of file
file(GLOB_RECURSE ALL_TEST_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.cpp" "*.cc")
add_executable(majel_tests ${ALL_TEST_FILES})
add_dependencies(majel_tests majel ${external_project_dependencies})
target_link_libraries(majel_tests
${Boost_LIBRARIES}
${GTEST_LIBRARIES}
majel
)
add_test(majel_tests majel_tests)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册