Skip to content

Commit

Permalink
modified checkpoint file to only use cereal, removed compiler pragma …
Browse files Browse the repository at this point in the history
…from Config, and removed inclusion of Find Boost in Cmake List, and removed Boost compiling in GTest
  • Loading branch information
GregorySchwing committed Aug 23, 2021
1 parent eb4cfb5 commit c96e4cc
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 300 deletions.
179 changes: 0 additions & 179 deletions CMake/FindBoost.cmake

This file was deleted.

24 changes: 0 additions & 24 deletions CMake/GOMCCPUSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED true)

if(ENSEMBLE_NVT)
add_executable(NVT ${sources} ${headers} ${libHeaders} ${libSources})
if(Boost_FOUND)
target_sources(NVT PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
set_target_properties(NVT PROPERTIES
OUTPUT_NAME ${NVT_name}
COMPILE_FLAGS "${NVT_flags}")
Expand All @@ -34,16 +31,10 @@ if(ENSEMBLE_NVT)
if(MPI_FOUND)
target_link_libraries(NVT ${MPI_LIBRARIES})
endif()
if(Boost_FOUND)
target_link_libraries(NVT ${BOOST_LIBRARIES})
endif()
endif()

if(ENSEMBLE_GEMC)
add_executable(GEMC ${sources} ${headers} ${libHeaders} ${libSources})
if(Boost_FOUND)
target_sources(GEMC PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
set_target_properties(GEMC PROPERTIES
OUTPUT_NAME ${GE_name}
COMPILE_FLAGS "${GE_flags}")
Expand All @@ -54,16 +45,10 @@ if(ENSEMBLE_GEMC)
if(MPI_FOUND)
target_link_libraries(GEMC ${MPI_LIBRARIES})
endif()
if(Boost_FOUND)
target_link_libraries(GEMC ${BOOST_LIBRARIES})
endif()
endif()

if(ENSEMBLE_GCMC)
add_executable(GCMC ${sources} ${headers} ${libHeaders} ${libSources})
if(Boost_FOUND)
target_sources(GCMC PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
set_target_properties(GCMC PROPERTIES
OUTPUT_NAME ${GC_name}
COMPILE_FLAGS "${GC_flags}")
Expand All @@ -74,16 +59,10 @@ if(ENSEMBLE_GCMC)
if(MPI_FOUND)
target_link_libraries(GCMC ${MPI_LIBRARIES})
endif()
if(Boost_FOUND)
target_link_libraries(GCMC ${BOOST_LIBRARIES})
endif()
endif()

if(ENSEMBLE_NPT)
add_executable(NPT ${sources} ${headers} ${libHeaders} ${libSources})
if(Boost_FOUND)
target_sources(NPT PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
set_target_properties(NPT PROPERTIES
OUTPUT_NAME ${NPT_name}
COMPILE_FLAGS "${NPT_flags}")
Expand All @@ -94,8 +73,5 @@ if(ENSEMBLE_NPT)
if(MPI_FOUND)
target_link_libraries(NPT ${MPI_LIBRARIES})
endif()
if(Boost_FOUND)
target_link_libraries(NPT ${BOOST_LIBRARIES})
endif()
endif()

24 changes: 0 additions & 24 deletions CMake/GOMCCUDASetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
if(ENSEMBLE_GPU_NVT)
add_executable(GPU_NVT ${cudaSources} ${cudaHeaders}
${sources} ${headers} ${libHeaders} ${libSources})
if(Boost_FOUND)
target_sources(GPU_NVT PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
set_target_properties(GPU_NVT PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
OUTPUT_NAME ${GPU_NVT_name}
Expand All @@ -57,17 +54,11 @@ if(ENSEMBLE_GPU_NVT)
if(MPI_FOUND)
target_link_libraries(GPU_NVT ${MPI_LIBRARIES})
endif()
if(Boost_FOUND)
target_link_libraries(GPU_NVT ${BOOST_LIBRARIES})
endif()
endif()

if(ENSEMBLE_GPU_GEMC)
add_executable(GPU_GEMC ${cudaSources} ${cudaHeaders} ${sources}
${headers} ${libHeaders} ${libSources})
if(Boost_FOUND)
target_sources(GPU_GEMC PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
set_target_properties(GPU_GEMC PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
OUTPUT_NAME ${GPU_GE_name}
Expand All @@ -82,17 +73,11 @@ if(ENSEMBLE_GPU_GEMC)
if(MPI_FOUND)
target_link_libraries(GPU_GEMC ${MPI_LIBRARIES})
endif()
if(Boost_FOUND)
target_link_libraries(GPU_GEMC ${BOOST_LIBRARIES})
endif()
endif()

if(ENSEMBLE_GPU_GCMC)
add_executable(GPU_GCMC ${cudaSources} ${cudaHeaders} ${sources}
${headers} ${libHeaders} ${libSources})
if(Boost_FOUND)
target_sources(GPU_GCMC PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
set_target_properties(GPU_GCMC PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
OUTPUT_NAME ${GPU_GC_name}
Expand All @@ -107,17 +92,11 @@ if(ENSEMBLE_GPU_GCMC)
if(MPI_FOUND)
target_link_libraries(GPU_GCMC ${MPI_LIBRARIES})
endif()
if(Boost_FOUND)
target_link_libraries(GPU_GCMC ${BOOST_LIBRARIES})
endif()
endif()

if(ENSEMBLE_GPU_NPT)
add_executable(GPU_NPT ${cudaSources} ${cudaHeaders} ${sources}
${headers} ${libHeaders} ${libSources})
if(Boost_FOUND)
target_sources(GPU_NPT PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
set_target_properties(GPU_NPT PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
OUTPUT_NAME ${GPU_NPT_name}
Expand All @@ -132,7 +111,4 @@ if(ENSEMBLE_GPU_NPT)
if(MPI_FOUND)
target_link_libraries(GPU_NPT ${MPI_LIBRARIES})
endif()
if(Boost_FOUND)
target_link_libraries(GPU_NPT ${BOOST_LIBRARIES})
endif()
endif()
15 changes: 0 additions & 15 deletions CMake/boost/CMakeLists.txt.in

This file was deleted.

24 changes: 1 addition & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,36 +53,14 @@ endif()

# Set Source and Header files
include(${PROJECT_SOURCE_DIR}/CMake/FileLists.cmake)

# find Boost, and if not found download and install serialization library for checkpointing
# Set Source and Header files
#set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/FindBoost.cmake")
set(GOMC_BOOST_LIB 0 CACHE INTERNAL
"Build a Boost-enabled version of GOMC" FORCE)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
find_package(Boost COMPONENTS serialization )

if(Boost_FOUND)
message(STATUS "Boost_INCLUDE_DIRS: ${BOOST_INCLUDE_DIRS}")
message(STATUS "Boost_LIBRARIES: ${BOOST_LIBRARIES}")
message(STATUS "Boost_VERSION: ${Boost_VERSION_STRING}")
set(GOMC_BOOST_LIB 1 CACHE INTERNAL
"Build a Boost-enabled version of GOMC" FORCE)
include_directories(${BOOST_INCLUDE_DIRS})
else()
message(STATUS "Using native checkpointing. To download boost -DCMAKE_DOWNLOAD_BOOST=ON")
include_directories(lib/cereal-1.3.0/include)
endif()
include_directories(lib/cereal-1.3.0/include)

#enable config header
configure_file(
"${PROJECT_SOURCE_DIR}/GOMC_Config.h.in"
"${PROJECT_BINARY_DIR}/GOMC_Config.h"
)


# Enable google test
# for now we will disable testing for intel compiler
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
Expand Down
3 changes: 0 additions & 3 deletions GOMC_Config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@

/* MPI_IN_PLACE exists for collective operations */
#cmakedefine01 MPI_IN_PLACE_EXISTS

/* Boost serialization library exists for checkpointing */
#cmakedefine01 GOMC_BOOST_LIB
Loading

0 comments on commit c96e4cc

Please sign in to comment.