diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2015-09-10 14:11:17 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2015-09-10 14:11:17 (GMT) |
commit | 10da31a926a0a2b4e2cee11656a89d5ab966815e (patch) | |
tree | a1544263bd33d1bd3e904a7352766fc3eb60d303 /CMakeLists.txt | |
parent | 1dc01a33b277bd48e6ac2d829d0f4f870cee83aa (diff) | |
download | hdf5-10da31a926a0a2b4e2cee11656a89d5ab966815e.zip hdf5-10da31a926a0a2b4e2cee11656a89d5ab966815e.tar.gz hdf5-10da31a926a0a2b4e2cee11656a89d5ab966815e.tar.bz2 |
[svn-r27745] Merge trunk revision 27744
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cd3e1c9..96d5772 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -625,12 +625,12 @@ if (BUILD_TESTING) option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0") mark_as_advanced (HDF_TEST_EXPRESS) - include (${HDF5_SOURCE_DIR}/CTestConfig.cmake) - configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY) - enable_testing () include (CTest) + include (${HDF5_SOURCE_DIR}/CTestConfig.cmake) + configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY) + if (NOT HDF5_EXTERNALLY_CONFIGURED) if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib) @@ -696,8 +696,18 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for endif (NOT ALLOW_UNSUPPORTED) endif (BUILD_SHARED_LIBS AND APPLE) option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON) + include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) + + message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") + # Building with PGI requires CMake 3.3 or greater because previous versions + # of CMake add the wrong compiler flag for the PGI Fortran compiler. + if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "PGI" AND "${CMAKE_VERSION}" VERSION_LESS "3.3") + message (FATAL_ERROR " **** PGI FORTRAN REQUIRES CMAKE VERSION 3.3 OR GREATER **** ") + endif () + include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) + if (HDF5_ENABLE_F2003) if (NOT FORTRAN_HAVE_ISO_C_BINDING) set (HDF5_ENABLE_F2003 OFF) |