diff options
author | Henry Fredrick Schreiner <henry.fredrick.schreiner@cern.ch> | 2018-03-01 11:35:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-07 13:24:27 (GMT) |
commit | 7dd8c7a680f409fdb1d78138e20fa9b80206431a (patch) | |
tree | 7dca66d679ade473bdbfc9895a78e33f9941ea84 /Modules/FindOpenMP.cmake | |
parent | 82de05088f762371c6cd753ae19533dc9f5cd6b2 (diff) | |
download | CMake-7dd8c7a680f409fdb1d78138e20fa9b80206431a.zip CMake-7dd8c7a680f409fdb1d78138e20fa9b80206431a.tar.gz CMake-7dd8c7a680f409fdb1d78138e20fa9b80206431a.tar.bz2 |
FindOpenMP: Improve inclusion of helper modules
Use `CMAKE_CURRENT_LIST_DIR` instead of `CMAKE_ROOT`.
Do not include modules inside a loop.
Diffstat (limited to 'Modules/FindOpenMP.cmake')
-rw-r--r-- | Modules/FindOpenMP.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index ced092e..3f8f61a 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -163,7 +163,7 @@ function(_OPENMP_WRITE_SOURCE_FILE LANG SRC_FILE_CONTENT_VAR SRC_FILE_NAME SRC_F set(${SRC_FILE_FULLPATH} "${SRC_FILE}" PARENT_SCOPE) endfunction() -include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseImplicitLinkInfo.cmake) function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) _OPENMP_FLAG_CANDIDATES("${LANG}") @@ -423,6 +423,8 @@ endif() unset(_OpenMP_MIN_VERSION) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) + foreach(LANG IN LISTS OpenMP_FINDLIST) if(CMAKE_${LANG}_COMPILER_LOADED) if (NOT OpenMP_${LANG}_SPEC_DATE AND OpenMP_${LANG}_FLAGS) @@ -432,8 +434,6 @@ foreach(LANG IN LISTS OpenMP_FINDLIST) _OPENMP_SET_VERSION_BY_SPEC_DATE("${LANG}") endif() - include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) - set(OpenMP_${LANG}_FIND_QUIETLY ${OpenMP_FIND_QUIETLY}) set(OpenMP_${LANG}_FIND_REQUIRED ${OpenMP_FIND_REQUIRED}) set(OpenMP_${LANG}_FIND_VERSION ${OpenMP_FIND_VERSION}) |