diff --git a/CMakeLists.txt b/CMakeLists.txt index 03373347582ad422bd81efcea9677c3b77ee066f..645afa0eb41ed837a16cd118a5ea4b6364d32a1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,10 +7,11 @@ # -DCMAKE_PREFIX_PATH='/dir1;/dir2;/dir3' # -cmake_minimum_required (VERSION 3.0) +cmake_minimum_required (VERSION 3.14) project (hepnos CXX) add_definitions (-g) +set (CMAKE_CXX_STANDARD 14) # add our cmake module directory to the path set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} @@ -35,7 +36,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) # packages we depend on include (xpkg-import) find_package (mercury CONFIG REQUIRED) -find_package (Boost REQUIRED COMPONENTS serialization system filesystem) +find_package (Boost REQUIRED COMPONENTS serialization) include_directories(${Boost_INCLUDE_DIRS}) xpkg_import_module (margo REQUIRED margo) xpkg_import_module (sdskv-client REQUIRED sdskv-client) diff --git a/src/DataStore.cpp b/src/DataStore.cpp index e9127d90ade4016bdf6a0cd175eda5395a65a1df..b1e4d666258f21131c8d39b909c391eb960a98ad 100644 --- a/src/DataStore.cpp +++ b/src/DataStore.cpp @@ -44,6 +44,7 @@ DataStore& DataStore::operator=(DataStore&& other) { m_impl->cleanup(); } m_impl = std::move(other.m_impl); + return *this; } DataStore::~DataStore() { diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e345e1caa603aed2eb6677d3530d0e901aed0697..54bc3e683ab7648d60e7f91873012228ef8f0902 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,40 +5,42 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test-util.sh ${CMAKE_CURRENT_BINARY_D configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test-util.sh ${CMAKE_CURRENT_BINARY_DIR}/test-util.sh COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.yaml ${CMAKE_CURRENT_BINARY_DIR}/config.yaml COPYONLY) +set (BOOST_DEPS Boost::serialization) + add_executable(example example.cpp) -target_link_libraries(example hepnos ${Boost_LIBRARIES}) +target_link_libraries(example hepnos ${BOOST_DEPS}) set(CTEST_ENVIRONMENT "MKTEMP=mktemp" "TIMEOUT=timeout") add_executable(DataStoreTest DataStoreTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(DataStoreTest cppunit hepnos) +target_link_libraries(DataStoreTest ${CPPUNIT_LIBRARIES} hepnos) add_executable(DataSetTest DataSetTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(DataSetTest cppunit hepnos) +target_link_libraries(DataSetTest ${CPPUNIT_LIBRARIES} hepnos) add_executable(RunSetTest RunSetTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(RunSetTest cppunit hepnos) +target_link_libraries(RunSetTest ${CPPUNIT_LIBRARIES} hepnos) add_executable(RunTest RunTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(RunTest cppunit hepnos) +target_link_libraries(RunTest ${CPPUNIT_LIBRARIES} hepnos) add_executable(SubRunTest SubRunTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(SubRunTest cppunit hepnos) +target_link_libraries(SubRunTest ${CPPUNIT_LIBRARIES} hepnos) add_executable(EventTest EventTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(EventTest cppunit hepnos) +target_link_libraries(EventTest ${CPPUNIT_LIBRARIES} hepnos) add_executable(LoadStoreTest LoadStoreTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(LoadStoreTest cppunit hepnos boost_serialization) +target_link_libraries(LoadStoreTest ${CPPUNIT_LIBRARIES} hepnos ${BOOST_DEPS}) add_executable(PtrTest PtrTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(PtrTest cppunit hepnos boost_serialization) +target_link_libraries(PtrTest ${CPPUNIT_LIBRARIES} hepnos ${BOOST_DEPS}) add_executable(WriteAndRestartTest WriteAndRestartTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(WriteAndRestartTest cppunit hepnos boost_serialization) +target_link_libraries(WriteAndRestartTest ${CPPUNIT_LIBRARIES} hepnos ${BOOST_DEPS}) add_executable(RestartAndReadTest RestartAndReadTest.cpp HEPnOSTestMain.cpp) -target_link_libraries(RestartAndReadTest cppunit hepnos boost_serialization) +target_link_libraries(RestartAndReadTest ${CPPUNIT_LIBRARIES} hepnos ${BOOST_DEPS}) add_test(NAME DataStoreTest COMMAND run-test.sh ./DataStoreTest) add_test(NAME DataSetTest COMMAND run-test.sh ./DataSetTest)