We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55c8415 commit 31d9f2bCopy full SHA for 31d9f2b
src/CMakeLists.txt
@@ -587,6 +587,12 @@ endif()
587
if (FLAMEGPU_ENABLE_MPI)
588
find_package(MPI REQUIRED)
589
if (MPI_CXX_FOUND)
590
+ # If CMake is older than 3.20.1, FindMPI may incorrectly wrap link options when CUDA is enabled.
591
+ # It is not guaranteed to be a problem, so we should warn rather than error.
592
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/21887
593
+ if(CMAKE_VERSION VERSION_LESS 3.20.1)
594
+ message(WARNING "CMake < 3.20.1 may result in link errors with FLAMEGPU_ENABLE_MPI=ON for some MPI installations. Consider using CMake >= 3.20.1.")
595
+ endif()
596
# This sets up include directories and lib
597
target_link_libraries(${PROJECT_NAME} PUBLIC MPI::MPI_CXX)
598
target_compile_definitions(${PROJECT_NAME} PUBLIC FLAMEGPU_ENABLE_MPI)
0 commit comments