diff --git a/CMakeLists.txt b/CMakeLists.txt index 973a60733..ebd89be45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,7 +215,9 @@ endif(ALTCPU) find_package(MPI REQUIRED) if ("${MPI_CXX_INCLUDE_DIRS}" STREQUAL "") - include_directories("${MPI_CXX_INCLUDE_PATH}") + if (NOT "${MPI_CXX_INCLUDE_PATH}" STREQUAL "") + include_directories("${MPI_CXX_INCLUDE_PATH}") + endif() else() include_directories("${MPI_CXX_INCLUDE_DIRS}") endif()