summaryrefslogtreecommitdiffstats
path: root/Modules/CheckFortranSourceCompiles.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CheckFortranSourceCompiles.cmake')
-rw-r--r--Modules/CheckFortranSourceCompiles.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake
index f0fde8d..3354bfb 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceCompiles.cmake
@@ -103,8 +103,6 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
if(NOT _SRC_EXT)
set(_SRC_EXT F)
endif()
- set(MACRO_CHECK_FUNCTION_DEFINITIONS
- "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
if(CMAKE_REQUIRED_LINK_OPTIONS)
set(CHECK_Fortran_SOURCE_COMPILES_ADD_LINK_OPTIONS
LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS})
@@ -132,10 +130,10 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
try_compile(${VAR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.${_SRC_EXT}
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ COMPILE_DEFINITIONS -D${VAR} ${CMAKE_REQUIRED_DEFINITIONS}
${CHECK_Fortran_SOURCE_COMPILES_ADD_LINK_OPTIONS}
${CHECK_Fortran_SOURCE_COMPILES_ADD_LIBRARIES}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}
"${CHECK_Fortran_SOURCE_COMPILES_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)