Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ option(ENABLE_MINIMAL "Compile EXP support libraries only" OFF)
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
option(BUILD_DOCS "Build documentation" OFF)
option(DISABLE_PYTHON "Disable the Python development environment" OFF)
if(DISABLE_PYTHON)
message(STATUS "Python development environment is disabled. pyEXP will not be built.")
if(ENABLE_PYEXP_ONLY)
message(FATAL_ERROR "DISABLE_PYTHON=ON is incompatible with ENABLE_PYEXP_ONLY=ON.")
endif()
set(ENABLE_PYEXP OFF CACHE BOOL "Enable the Python bindings" FORCE)
endif()
Comment thread
Copilot marked this conversation as resolved.

# Metaflag for minimal build

Expand Down Expand Up @@ -259,14 +266,18 @@ execute_process(
)

include_directories(${PROJECT_SOURCE_DIR}/extern/yaml-cpp/include)
include_directories(${PROJECT_SOURCE_DIR}/extern/pybind11/include)
if (NOT DISABLE_PYTHON)
include_directories(${PROJECT_SOURCE_DIR}/extern/pybind11/include)
endif()
include_directories(${PROJECT_SOURCE_DIR}/extern/QuickDigest5/include)

# Report to the user
message("Configuring build for ${GIT_BRANCH}/${GIT_COMMIT} at ${COMPILE_TIME}")

add_subdirectory(extern/yaml-cpp)
add_subdirectory(extern/pybind11)
if (NOT DISABLE_PYTHON)
add_subdirectory(extern/pybind11)
endif()

# Set options for the HighFive git submodule in extern
set(HIGHFIVE_EXAMPLES OFF CACHE BOOL "Do not build the examples")
Expand Down
6 changes: 5 additions & 1 deletion exputil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ set(common_INCLUDE_DIRS $<INSTALL_INTERFACE:include>

set(common_LINKLIB ${DEP_LIB} OpenMP::OpenMP_CXX MPI::MPI_CXX yaml-cpp
${VTK_LIBRARIES} ${HDF5_CXX_LIBRARIES} ${HDF5_LIBRARIES}
${HDF5_HL_LIBRARIES} ${FFTW_DOUBLE_LIB} pybind11::embed)
${HDF5_HL_LIBRARIES} ${FFTW_DOUBLE_LIB})
if(NOT DISABLE_PYTHON)
list(APPEND common_LINKLIB pybind11::embed)
endif()


if(ENABLE_CUDA)
list(APPEND common_LINKLIB CUDA::toolkit CUDA::cudart)
Expand Down
1 change: 1 addition & 0 deletions exputil/realize_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <random>
#include <memory>
#include <cmath>
#include <cassert>

#include "localmpi.H"
#include "massmodel.H"
Expand Down
14 changes: 11 additions & 3 deletions utils/Test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

set(bin_PROGRAMS testBarrier expyaml orthoTest testDeproj
testEmpDeproj testEmp testED testmd5)
testEmpDeproj testED testmd5)

if(NOT DISABLE_PYTHON)
list(APPEND bin_PROGRAMS testEmp)
endif()

set(common_LINKLIB OpenMP::OpenMP_CXX MPI::MPI_CXX expui exputil
yaml-cpp ${VTK_LIBRARIES})
Expand Down Expand Up @@ -37,7 +41,9 @@ add_executable(orthoTest orthoTest.cc Biorth2Ortho.cc)
add_executable(testDeproj testDeproject.cc CubicSpline.cc Deprojector.cc)
add_executable(testEmpDeproj testEmpDeproj.cc CubicSpline.cc
Deprojector.cc EmpDeproj.cc)
add_executable(testEmp testEmp.cc EmpDeproj.cc)
if(NOT DISABLE_PYTHON)
add_executable(testEmp testEmp.cc EmpDeproj.cc)
endif()
add_executable(testmd5 testmd5.cc)
add_executable(testED testED.cc EmpDeproj.cc)

Expand All @@ -49,6 +55,8 @@ foreach(program ${bin_PROGRAMS})
endforeach()

# For Python interpreter...
target_link_libraries(testEmp ${common_LINKLIB} pybind11::embed)
if(NOT DISABLE_PYTHON)
target_link_libraries(testEmp ${common_LINKLIB} pybind11::embed)
endif()

install(TARGETS expyaml DESTINATION bin)
Loading