ceph/CMakeLists.txt

35 lines
800 B
CMake
Raw Normal View History

cmake_minimum_required(VERSION 2.8.11)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
Squashed 'src/dmclock/' changes from 64bcc6e..3408cb8 3408cb8 Merge pull request #33 from ceph/wip-move-make-options-up f2099ec Moved the check for cmake's DO_NOT_DELAY_TAG_CALC to the top level, so it will affect how tests are built. 437b247 Merge pull request #32 from ceph/wip_add_void_comments 18dd014 Add documentation as to why there are empty void references. 3ddfa39 Merge pull request #28 from Yan-waller/wip-waller-0710dmclockgettime 57520df Merge pull request #31 from dingdangzhang/master 4cad292 delete redundant break statement b179f3b Merge pull request #29 from tchaikov/wip-cmake 76d5f35 cmake: build gtest if not found 9896fef Merge pull request #30 from tchaikov/wip-move d72fac1 do FRIEND_TEST manually f4b155d enforce move semantics of request types 8a2ad2a replace gettimeofday() with clock_gettime() function b84ccf9 Merge pull request #27 from ceph/joelin-master-ei 34a6e25 Set compiler flags at higher level CMakeLists.txt file, so they apply to sim and test, and so earlier versions of GCC know to use c++11 standard. Clean up cmake files in general. bad581a Move the PrCtl data structure into a separate header file that can be included where needed in the future. Also, to avoid potential naming conflicts with ceph's PrCtl.h, prefix the filename with "dmc". 1b227bf Merge pull request #25 from badone/wip-test_dmclock_server-coredump ee1866e dmclock: Don't dump core when using EXPECT_DEATH_IF_SUPPORTED git-subtree-dir: src/dmclock git-subtree-split: 3408cb8f3c20d1956d8a08f15958627fbb60e733
2017-08-04 16:35:34 +00:00
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++11 -Wno-write-strings -Wall -pthread")
if(DO_NOT_DELAY_TAG_CALC)
add_definitions(-DDO_NOT_DELAY_TAG_CALC)
endif()
if (NOT(TARGET gtest AND TARGET gtest_main))
Squashed 'src/dmclock/' changes from 64bcc6e..3408cb8 3408cb8 Merge pull request #33 from ceph/wip-move-make-options-up f2099ec Moved the check for cmake's DO_NOT_DELAY_TAG_CALC to the top level, so it will affect how tests are built. 437b247 Merge pull request #32 from ceph/wip_add_void_comments 18dd014 Add documentation as to why there are empty void references. 3ddfa39 Merge pull request #28 from Yan-waller/wip-waller-0710dmclockgettime 57520df Merge pull request #31 from dingdangzhang/master 4cad292 delete redundant break statement b179f3b Merge pull request #29 from tchaikov/wip-cmake 76d5f35 cmake: build gtest if not found 9896fef Merge pull request #30 from tchaikov/wip-move d72fac1 do FRIEND_TEST manually f4b155d enforce move semantics of request types 8a2ad2a replace gettimeofday() with clock_gettime() function b84ccf9 Merge pull request #27 from ceph/joelin-master-ei 34a6e25 Set compiler flags at higher level CMakeLists.txt file, so they apply to sim and test, and so earlier versions of GCC know to use c++11 standard. Clean up cmake files in general. bad581a Move the PrCtl data structure into a separate header file that can be included where needed in the future. Also, to avoid potential naming conflicts with ceph's PrCtl.h, prefix the filename with "dmc". 1b227bf Merge pull request #25 from badone/wip-test_dmclock_server-coredump ee1866e dmclock: Don't dump core when using EXPECT_DEATH_IF_SUPPORTED git-subtree-dir: src/dmclock git-subtree-split: 3408cb8f3c20d1956d8a08f15958627fbb60e733
2017-08-04 16:35:34 +00:00
if (NOT GTEST_FOUND)
find_package(GTest QUIET)
if (NOT GTEST_FOUND)
include(BuildGTest)
endif()
endif()
endif()
if (NOT(BOOST_FOUND))
find_package(Boost REQUIRED)
endif()
add_subdirectory(src)
add_subdirectory(sim)
enable_testing()
add_subdirectory(test)
add_subdirectory(support/test)
add_test(NAME dmclock-tests
COMMAND $<TARGET_FILE:dmclock-tests>)
add_test(NAME dmclock-data-struct-tests
COMMAND $<TARGET_FILE:dmclock-data-struct-tests>)