diff --git a/modules/find/FindPTSCOTCH.cmake b/modules/find/FindPTSCOTCH.cmake index 1e81c0d3a147a1868c67edbb72553fdfb1840210..56382f75a9e613ac3cb1cd1b8c83c72f61c8719c 100644 --- a/modules/find/FindPTSCOTCH.cmake +++ b/modules/find/FindPTSCOTCH.cmake @@ -372,9 +372,7 @@ mark_as_advanced(PTSCOTCH_DIR_FOUND) # Check the size of SCOTCH_Num # --------------------------------- -set(CMAKE_REQUIRED_INCLUDES ${PTSCOTCH_INCLUDE_DIRS}) -# Add ptscotch dependencies incdirs (mainly MPI) to required includes for the examples -list(APPEND CMAKE_REQUIRED_INCLUDES ${PTSCOTCH_INCLUDE_DIRS_DEP}) +set(CMAKE_REQUIRED_INCLUDES ${PTSCOTCH_INCLUDE_DIRS_DEP}) include(CheckCSourceRuns) #stdio.h and stdint.h should be included by scotch.h directly #mpi.h not included into ptscotch.h => MPI_comm undefined