summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-02-12 21:52:48 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-02-12 21:52:48 (GMT)
commitab75986b8c70369cf86efcb42ffaadc5647d51b9 (patch)
tree647ebffa5bc374035efab449575e21011fa8174e /fortran
parent1b784081847f83b99807021a73673e591f27272f (diff)
downloadhdf5-ab75986b8c70369cf86efcb42ffaadc5647d51b9.zip
hdf5-ab75986b8c70369cf86efcb42ffaadc5647d51b9.tar.gz
hdf5-ab75986b8c70369cf86efcb42ffaadc5647d51b9.tar.bz2
[svn-r26161] Fix cmake case.
Turn on F2003 by default. Set source properties in fortran cmake files.
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/CMakeLists.txt3
-rw-r--r--fortran/test/CMakeTests.cmake2
2 files changed, 4 insertions, 1 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 5b641d1..06b9bed 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -132,7 +132,6 @@ if (H5_HAVE_PARALLEL)
${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpiof.c
)
endif (H5_HAVE_PARALLEL)
-
set_source_files_properties (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C)
set (f90CStub_C_HDRS
@@ -224,6 +223,7 @@ else (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90
)
endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran)
#-----------------------------------------------------------------------------
# Add Main fortran library
@@ -255,6 +255,7 @@ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF
H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} ${LIB_TYPE})
set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/fortran
+ LINKER_LANGUAGE Fortran
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 6a9c535..4df50ad 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -11,11 +11,13 @@ set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSIO
#-- Adding test for testhdf5_fortran_1_8
add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_F2003)
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+ set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8)
endif (HDF5_ENABLE_F2003)
#-- Adding test for fflush1