提交 16976b05 编写于 作者: G gangliao 提交者: GitHub

Merge pull request #2163 from gangliao/ten_fix

dynamic link boost
...@@ -9,6 +9,13 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) ...@@ -9,6 +9,13 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
get_filename_component(PARENT_DIR ${PARENT_DIR} DIRECTORY) get_filename_component(PARENT_DIR ${PARENT_DIR} DIRECTORY)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PARENT_DIR}/cmake") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PARENT_DIR}/cmake")
# enable boost
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(FATAL "Cannot find Boost library.")
endif()
include_directories(${Boost_INCLUDE_DIRS})
# enable c++11 # enable c++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
......
...@@ -3,7 +3,6 @@ file(GLOB_RECURSE ALL_TEST_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.cc") ...@@ -3,7 +3,6 @@ file(GLOB_RECURSE ALL_TEST_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.cc")
add_executable(majel_tests ${ALL_TEST_FILES}) add_executable(majel_tests ${ALL_TEST_FILES})
add_dependencies(majel_tests majel) add_dependencies(majel_tests majel)
target_link_libraries(majel_tests target_link_libraries(majel_tests
${Boost_LIBRARIES}
${GTEST_LIBRARIES} ${GTEST_LIBRARIES}
${GTEST_MAIN_LIBRARIES} ${GTEST_MAIN_LIBRARIES}
majel majel
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册