Made the MPI flag global instead of just core

This commit is contained in:
jpekkila
2020-03-26 14:57:22 +02:00
parent e1bec4459b
commit fbd4b9a385
2 changed files with 3 additions and 1 deletions

View File

@@ -67,6 +67,9 @@ add_custom_target(dsl_headers ALL DEPENDS ${DSL_HEADERS})
if (DOUBLE_PRECISION)
add_definitions(-DAC_DOUBLE_PRECISION=1)
endif ()
if (MPI_ENABLED)
add_definitions(-DAC_MPI_ENABLED=1)
endif ()
add_definitions(-DAC_DEFAULT_CONFIG="${CMAKE_SOURCE_DIR}/config/astaroth.conf")

View File

@@ -6,7 +6,6 @@ target_link_libraries(astaroth_core astaroth_utils astaroth_kernels cudart)
if (MPI_ENABLED)
find_package(MPI)
target_link_libraries(astaroth_core MPI::MPI_CXX)
target_compile_definitions(astaroth_core PRIVATE -DAC_MPI_ENABLED=1)
endif()
if (MULTIGPU_ENABLED)