summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-06 23:40:16 (GMT)
committerBrad King <brad.king@kitware.com>2021-07-06 23:41:35 (GMT)
commit1a9ebd1694aeeb97dc073c0dde75ddb8cd91794b (patch)
tree6ac8395f70ff3cb9b7cbe0d119f2b0730c87eb60 /Modules/FindMPI.cmake
parent16d9c317a30431b98c144f9529124746e4ea1d80 (diff)
downloadCMake-1a9ebd1694aeeb97dc073c0dde75ddb8cd91794b.zip
CMake-1a9ebd1694aeeb97dc073c0dde75ddb8cd91794b.tar.gz
CMake-1a9ebd1694aeeb97dc073c0dde75ddb8cd91794b.tar.bz2
FindMPI: Honor MPI_CXX_SKIP_MPICXX when set as a normal variable
Express the cache entry with `option()`. In combination with policies CMP0077 and CMP0102, this allows project code to control the switch with a variable: ``` set(MPI_CXX_SKIP_MPICXX TRUE) find_package(MPI COMPONENTS CXX) ```
Diffstat (limited to 'Modules/FindMPI.cmake')
-rw-r--r--Modules/FindMPI.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index c48decb..43fdace 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -1440,7 +1440,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
endif()
if(_MPI_FIND_${LANG})
if( ${LANG} STREQUAL CXX AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS )
- set(MPI_CXX_SKIP_MPICXX FALSE CACHE BOOL "If true, the MPI-2 C++ bindings are disabled using definitions.")
+ option(MPI_CXX_SKIP_MPICXX "If true, the MPI-2 C++ bindings are disabled using definitions." FALSE)
mark_as_advanced(MPI_CXX_SKIP_MPICXX)
endif()
if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_COMPILER_INCLUDE_DIRS)))