diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2019-12-08 00:39:02 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2019-12-10 14:43:27 (GMT) |
commit | 24fdd51f4503ccee33c07881cc8dd487cdc8b347 (patch) | |
tree | ff07504a0782e3a79fb996594d9fcbcabf98ecf0 /Modules/CMakeAddFortranSubdirectory.cmake | |
parent | 90e3e2a7778dc0ec5b421e9657ec49936a3cf174 (diff) | |
download | CMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.zip CMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.tar.gz CMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.tar.bz2 |
Refactor: Replace CMAKE_CURRENT_LIST_DIR with CMAKE_CURRENT_FUNCTION_LIST_DIR
Some modules define an intermediate global scope visible variables
to access "resource" files from functions.
Now these variables could be eliminated.
Diffstat (limited to 'Modules/CMakeAddFortranSubdirectory.cmake')
-rw-r--r-- | Modules/CMakeAddFortranSubdirectory.cmake | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake index 2613569..d4b537f 100644 --- a/Modules/CMakeAddFortranSubdirectory.cmake +++ b/Modules/CMakeAddFortranSubdirectory.cmake @@ -43,7 +43,6 @@ future version that supports installation of the external project binaries during ``make install``. #]=======================================================================] -set(_MS_MINGW_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) include(CheckLanguage) include(ExternalProject) @@ -87,11 +86,11 @@ function(_setup_mingw_config_and_build source_dir build_dir) file(TO_NATIVE_PATH "${MINGW_PATH}" MINGW_PATH) string(REPLACE "\\" "\\\\" MINGW_PATH "${MINGW_PATH}") configure_file( - ${_MS_MINGW_SOURCE_DIR}/CMakeAddFortranSubdirectory/config_mingw.cmake.in + ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CMakeAddFortranSubdirectory/config_mingw.cmake.in ${build_dir}/config_mingw.cmake @ONLY) configure_file( - ${_MS_MINGW_SOURCE_DIR}/CMakeAddFortranSubdirectory/build_mingw.cmake.in + ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CMakeAddFortranSubdirectory/build_mingw.cmake.in ${build_dir}/build_mingw.cmake @ONLY) endfunction() |