summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-09-22 16:04:54 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-09-22 16:04:54 (GMT)
commita2236b4e89e2736e0080064aef0835e19709842a (patch)
tree7902ae9acda94d2bda3980653c760c6e9c950741 /config
parent57d670faa68f1ce52d82652be5f88ee02f862545 (diff)
downloadhdf5-a2236b4e89e2736e0080064aef0835e19709842a.zip
hdf5-a2236b4e89e2736e0080064aef0835e19709842a.tar.gz
hdf5-a2236b4e89e2736e0080064aef0835e19709842a.tar.bz2
[svn-r27855] Merged revisions:
27509, 27515, 27517, 27521, 27524, 27525, 27537, 27555, 27570, 27575, 27585, 27586, 27590, 27591, 27592 from the trunk. Minor CMake and Fortran changes Tested on: jam (w/ gcc/gfortran 4.9.3)
Diffstat (limited to 'config')
-rw-r--r--config/cmake_ext_mod/HDFUseFortran.cmake18
-rw-r--r--config/cmake_ext_mod/grepTest.cmake10
-rw-r--r--config/conclude_fc.am33
3 files changed, 49 insertions, 12 deletions
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 66a631f..c1df8cf 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -28,7 +28,6 @@ set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
# so this one is used for a sizeof test.
#-----------------------------------------------------------------------------
MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- if (NOT DEFINED ${VARIABLE})
message (STATUS "Testing Fortran ${FUNCTION}")
if (CMAKE_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
@@ -40,7 +39,7 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
"${CODE}"
)
- TRY_COMPILE (${VARIABLE}
+ TRY_COMPILE (RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
@@ -51,21 +50,21 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
# message ( "Test result ${OUTPUT}")
# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- if (${VARIABLE})
+ if (${RESULT_VAR})
set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
message (STATUS "Testing Fortran ${FUNCTION} - OK")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n"
)
- else (${VARIABLE})
+ else ()
message (STATUS "Testing Fortran ${FUNCTION} - Fail")
- set (${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
- endif (${VARIABLE})
- endif (NOT DEFINED ${VARIABLE})
+ endif ()
+
ENDMACRO (CHECK_FORTRAN_FEATURE)
#-----------------------------------------------------------------------------
@@ -77,6 +76,7 @@ ENDMACRO (CHECK_FORTRAN_FEATURE)
#-----------------------------------------------------------------------------
# Check for Non-standard extension intrinsic function SIZEOF
+set(FORTRAN_HAVE_SIZEOF FALSE)
CHECK_FORTRAN_FEATURE(sizeof
"
PROGRAM main
@@ -87,6 +87,7 @@ CHECK_FORTRAN_FEATURE(sizeof
)
# Check for F2008 standard intrinsic function C_SIZEOF
+set(FORTRAN_HAVE_C_SIZEOF FALSE)
CHECK_FORTRAN_FEATURE(c_sizeof
"
PROGRAM main
@@ -112,6 +113,7 @@ CHECK_FORTRAN_FEATURE(storage_size
)
# Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
+set(HAVE_ISO_FORTRAN_ENV FALSE)
CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV
"
PROGRAM main
@@ -121,6 +123,7 @@ CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV
HAVE_ISO_FORTRAN_ENV
)
+set(FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
CHECK_FORTRAN_FEATURE(RealIsNotDouble
"
MODULE type_mod
@@ -150,6 +153,7 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble
#-----------------------------------------------------------------------------
# Checks if the ISO_C_BINDING module meets all the requirements
#-----------------------------------------------------------------------------
+set(FORTRAN_HAVE_ISO_C_BINDING FALSE)
CHECK_FORTRAN_FEATURE(iso_c_binding
"
PROGRAM main
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index 579d855..5f07134 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -27,7 +27,7 @@ endif (NOT TEST_REFERENCE)
message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
+execute_process (
COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
@@ -44,16 +44,16 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
# TEST_REFERENCE should always be matched
-STRING(REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
-STRING(COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
+string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
+string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
if (${TEST_RESULT} STREQUAL "0")
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
endif (${TEST_RESULT} STREQUAL "0")
-STRING(REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
+string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
if (${TEST_EXPECT} STREQUAL "1")
# TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
- STRING(LENGTH "${TEST_MATCH}" TEST_RESULT)
+ string (LENGTH "${TEST_MATCH}" TEST_RESULT)
if (NOT ${TEST_RESULT} STREQUAL "0")
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
endif (NOT ${TEST_RESULT} STREQUAL "0")
diff --git a/config/conclude_fc.am b/config/conclude_fc.am
new file mode 100644
index 0000000..d9e7b56
--- /dev/null
+++ b/config/conclude_fc.am
@@ -0,0 +1,33 @@
+## config/conclude_fc.am
+## (Use double hashes for copyright notice so that automake treats it as
+## comments and does not pass it to Makefile.in)
+## Copyright by The HDF Group.
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+## This file is part of HDF5. The full HDF5 copyright notice, including
+## terms governing use, modification, and redistribution, is contained in
+## the files COPYING and Copyright.html. COPYING can be found at the root
+## of the source code distribution tree; Copyright.html can be found at the
+## root level of an installed copy of the electronic HDF5 document set and
+## is linked from the top-level documents page. It can also be found at
+## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+## access to either file, you may request a copy from help@hdfgroup.org.
+
+
+## Textually included at the end of the Fortran HDF5 Makefiles.am.
+
+# Makefile.am include fragment with Fortran helper rules and macros.
+
+# AM_FCCPPFLAGS, FCCPPFLAGS are currently not used.
+
+PPFCCOMPILE = $(FC) $(FCDEFS) $(DEFAULT_INCLUDES) $(FCINCLUDES) $(AM_FCCPPFLAGS) $(FCCPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(PPFCCOMPILE)
+
+# Treat all .f90 and .F90 files as preprocessed Fortran.
+.f90.o:
+ $(PPFCCOMPILE) -c -o $@ $(FCFLAGS) $<
+.F90.o:
+ $(PPFCCOMPILE) -c -o $@ $(FCFLAGS) $<
+
+include $(top_srcdir)/config/conclude.am