We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dfb74c commit 338a9e3Copy full SHA for 338a9e3
src/CMakeLists.txt
@@ -562,6 +562,12 @@ endif()
562
if (FLAMEGPU_ENABLE_MPI)
563
find_package(MPI REQUIRED)
564
if (MPI_CXX_FOUND)
565
+ # If CMake is older than 3.20.1, FindMPI may incorrectly wrap link options when CUDA is enabled.
566
+ # It is not guaranteed to be a problem, so we should warn rather than error.
567
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/21887
568
+ if(CMAKE_VERSION VERSION_LESS 3.20.1)
569
+ 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.")
570
+ endif()
571
# This sets up include directories and lib
572
target_link_libraries(${PROJECT_NAME} PUBLIC MPI::MPI_CXX)
573
target_compile_definitions(${PROJECT_NAME} PUBLIC FLAMEGPU_ENABLE_MPI)
0 commit comments