This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 149103458f16b9776d88a4e6287a14eb13ef24d1 (commit) via 4d3874d5ad25d1907a56a92aba7ae94768726c72 (commit) via 86d2e4276d934c0e04ad129881d1cc9d2916d121 (commit) from af0dd7f74b8ec0e00ac57a66d25ea8b0e20a4d7f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=149103458f16b9776d88a4e6287a14eb13ef24d1 commit 149103458f16b9776d88a4e6287a14eb13ef24d1 Merge: af0dd7f 4d3874d Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Sep 22 14:50:31 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Sep 22 14:50:31 2016 -0400 Merge topic 'CheckFortranSourceCompiles-custom-ext' into next 4d3874d5 CheckFortranSourceCompiles: Add support for custom source extension 86d2e427 CheckFortranSourceCompiles: Fix FAIL_REGEX documentation typo https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d3874d5ad25d1907a56a92aba7ae94768726c72 commit 4d3874d5ad25d1907a56a92aba7ae94768726c72 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Sep 22 14:45:55 2016 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Sep 22 14:49:54 2016 -0400 CheckFortranSourceCompiles: Add support for custom source extension Fortran compilers interpret the source extension to decide whether to preprocess and what language level to use by default. diff --git a/Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst b/Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst new file mode 100644 index 0000000..bf62812 --- /dev/null +++ b/Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst @@ -0,0 +1,6 @@ +CheckFortranSourceCompiles-custom-ext +------------------------------------- + +* The :module:`CheckFortranSourceCompiles` module macro + ``CHECK_Fortran_SOURCE_COMPILES`` gained a ``SRC_EXT`` option + to specify a custom test Fortran source file extension. diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake index 20d1fd9..967b830 100644 --- a/Modules/CheckFortranSourceCompiles.cmake +++ b/Modules/CheckFortranSourceCompiles.cmake @@ -4,7 +4,8 @@ # # Check if given Fortran source compiles and links into an executable:: # -# CHECK_Fortran_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>]) +# CHECK_Fortran_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>] +# [SRC_EXT <ext>]) # # The arguments are: # @@ -15,6 +16,8 @@ # Will be created as an internal cache variable. # ``FAIL_REGEX <fail-regex>`` # Fail if test output matches this regex. +# ``SRC_EXT <ext>`` +# Use source extension ``.<ext>`` instead of the default ``.F``. # # The following variables may be set before calling this macro to modify # the way the check is run:: @@ -43,9 +46,10 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") set(_FAIL_REGEX) + set(_SRC_EXT) set(_key) foreach(arg ${ARGN}) - if("${arg}" MATCHES "^(FAIL_REGEX)$") + if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$") set(_key "${arg}") elseif(_key) list(APPEND _${_key} "${arg}") @@ -53,6 +57,9 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) message(FATAL_ERROR "Unknown argument:\n ${arg}\n") endif() endforeach() + if(NOT _SRC_EXT) + set(_SRC_EXT F) + endif() set(MACRO_CHECK_FUNCTION_DEFINITIONS "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") if(CMAKE_REQUIRED_LIBRARIES) @@ -67,7 +74,7 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) else() set(CHECK_Fortran_SOURCE_COMPILES_ADD_INCLUDES) endif() - file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.F" + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.${_SRC_EXT}" "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) @@ -75,7 +82,7 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) endif() try_compile(${VAR} ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.F + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.${_SRC_EXT} COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${CHECK_Fortran_SOURCE_COMPILES_ADD_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86d2e4276d934c0e04ad129881d1cc9d2916d121 commit 86d2e4276d934c0e04ad129881d1cc9d2916d121 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Sep 22 14:37:12 2016 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Sep 22 14:47:34 2016 -0400 CheckFortranSourceCompiles: Fix FAIL_REGEX documentation typo diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake index 0bdcffa..20d1fd9 100644 --- a/Modules/CheckFortranSourceCompiles.cmake +++ b/Modules/CheckFortranSourceCompiles.cmake @@ -13,7 +13,7 @@ # ``<var>`` # Variable to store whether the source code compiled. # Will be created as an internal cache variable. -# ``<fail-regex>`` +# ``FAIL_REGEX <fail-regex>`` # Fail if test output matches this regex. # # The following variables may be set before calling this macro to modify ----------------------------------------------------------------------- Summary of changes: .../dev/CheckFortranSourceCompiles-custom-ext.rst | 6 ++++++ Modules/CheckFortranSourceCompiles.cmake | 17 ++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits