summaryrefslogtreecommitdiffstats
path: root/hl/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2014-03-11 21:14:57 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2014-03-11 21:14:57 (GMT)
commita3292a77cef4fc760aab8b496cd6b105c5370890 (patch)
tree188bd8e5268775213f516dc7062ead790a9997b1 /hl/fortran
parent5b7c8c7a7d0b40e36a744f7e1dc68cd189e321b2 (diff)
downloadhdf5-a3292a77cef4fc760aab8b496cd6b105c5370890.zip
hdf5-a3292a77cef4fc760aab8b496cd6b105c5370890.tar.gz
hdf5-a3292a77cef4fc760aab8b496cd6b105c5370890.tar.bz2
[svn-r24781] HDFFV-8700 -
KitWare recommendations: Change CMake commands to lower case. Remove INCLUDE_DIRECTORIES in src for target level includes. Change ADD_DEFINITIONS package debug defines into CMake option. Remove -DNDEBUG
Diffstat (limited to 'hl/fortran')
-rw-r--r--hl/fortran/CMakeLists.txt8
-rw-r--r--hl/fortran/examples/CMakeLists.txt20
-rw-r--r--hl/fortran/examples/CMakeTests.cmake4
-rw-r--r--hl/fortran/src/CMakeLists.txt68
-rw-r--r--hl/fortran/test/CMakeLists.txt34
5 files changed, 67 insertions, 67 deletions
diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt
index 0da0825..f0ff22d 100644
--- a/hl/fortran/CMakeLists.txt
+++ b/hl/fortran/CMakeLists.txt
@@ -9,13 +9,13 @@ ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src)
#-----------------------------------------------------------------------------
# Build the HL Fortran Examples
#-----------------------------------------------------------------------------
-IF (HDF5_BUILD_FORTRAN_EXAMPLES)
+if (HDF5_BUILD_FORTRAN_EXAMPLES)
ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples)
-ENDIF (HDF5_BUILD_FORTRAN_EXAMPLES)
+endif (HDF5_BUILD_FORTRAN_EXAMPLES)
#-----------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index 0f663c7..189c9cc 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -10,27 +10,27 @@ INCLUDE_DIRECTORIES (
${HDF5_F90_SRC_DIR}/src
)
-SET (examples
+set (examples
exlite
ex_ds1
)
-FOREACH (example ${examples})
- ADD_EXECUTABLE (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
+foreach (example ${examples})
+ add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (hl_f90_ex_${example} ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} " " " ")
- TARGET_LINK_LIBRARIES (hl_f90_ex_${example}
+ target_link_libraries (hl_f90_ex_${example}
${HDF5_HL_F90_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
+ set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
+ set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
-ENDFOREACH (example ${examples})
+endforeach (example ${examples})
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake
index 7e6c348..1eb7b47 100644
--- a/hl/fortran/examples/CMakeTests.cmake
+++ b/hl/fortran/examples/CMakeTests.cmake
@@ -5,6 +5,6 @@
##############################################################################
##############################################################################
-FOREACH (example ${examples})
+foreach (example ${examples})
ADD_TEST (NAME hl_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
-ENDFOREACH (example ${examples})
+endforeach (example ${examples})
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 22353f8..9efcbc8 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -14,66 +14,66 @@ INCLUDE_DIRECTORIES (
#-----------------------------------------------------------------------------
# hl_f90CStub lib
#-----------------------------------------------------------------------------
-SET (HDF5_HL_F90_C_SRCS
+set (HDF5_HL_F90_C_SRCS
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMcc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBfc.c
)
-SET_SOURCE_FILES_PROPERTIES (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C)
+set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C)
-SET (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
+set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
-ADD_LIBRARY (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
+add_library (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
+target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran)
-SET_TARGET_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C)
+set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran)
+set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C)
#-----------------------------------------------------------------------------
# Fortran Modules
#-----------------------------------------------------------------------------
-SET (HDF5_HL_F90_F_SRCS
+set (HDF5_HL_F90_F_SRCS
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.f90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90
)
-ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
-SET (SHARED_LINK_FLAGS " ")
-IF (BUILD_SHARED_LIBS)
- IF (WIN32 AND NOT CYGWIN)
- SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
+add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
+set (SHARED_LINK_FLAGS " ")
+if (BUILD_SHARED_LIBS)
+ if (WIN32 AND NOT CYGWIN)
+ set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
BUILD_HDF5_DLL
)
- IF (MSVC)
- SET (SHARED_LINK_FLAGS "/DLL")
- ENDIF (MSVC)
- ENDIF (WIN32 AND NOT CYGWIN)
-ENDIF (BUILD_SHARED_LIBS)
-IF (WIN32 AND NOT CYGWIN)
- SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
+ if (MSVC)
+ set (SHARED_LINK_FLAGS "/DLL")
+ endif (MSVC)
+ endif (WIN32 AND NOT CYGWIN)
+endif (BUILD_SHARED_LIBS)
+if (WIN32 AND NOT CYGWIN)
+ set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-ENDIF (WIN32 AND NOT CYGWIN)
+endif (WIN32 AND NOT CYGWIN)
TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
-SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
-TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
+set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
+target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran)
+set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-IF (WIN32 AND NOT CYGWIN)
- INSTALL (
+if (WIN32 AND NOT CYGWIN)
+ install (
DIRECTORY
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/
DESTINATION
@@ -81,8 +81,8 @@ IF (WIN32 AND NOT CYGWIN)
COMPONENT
fortheaders
)
-ELSE (WIN32 AND NOT CYGWIN)
- INSTALL (
+else (WIN32 AND NOT CYGWIN)
+ install (
DIRECTORY
${CMAKE_Fortran_MODULE_DIRECTORY}/
DESTINATION
@@ -90,17 +90,17 @@ ELSE (WIN32 AND NOT CYGWIN)
COMPONENT
fortheaders
)
-ENDIF (WIN32 AND NOT CYGWIN)
+endif (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
+if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries)
#INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries)
- INSTALL (
+ install (
TARGETS
${HDF5_HL_F90_C_LIB_TARGET}
${HDF5_HL_F90_LIB_TARGET}
@@ -110,4 +110,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlfortlibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hlfortlibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 2084162..23c199c 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -7,35 +7,35 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-- Adding test for hl_f90_tstds
-ADD_EXECUTABLE (hl_f90_tstds tstds.f90)
+add_executable (hl_f90_tstds tstds.f90)
TARGET_NAMING (hl_f90_tstds ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_tstds " " " ")
-TARGET_LINK_LIBRARIES (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
+target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tstlite
-ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90)
+add_executable (hl_f90_tstlite tstlite.f90)
TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite " " " ")
-TARGET_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
+target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tstimage
-ADD_EXECUTABLE (hl_f90_tstimage tstimage.f90)
+add_executable (hl_f90_tstimage tstimage.f90)
TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage " " " ")
-TARGET_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
+target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tsttable
-ADD_EXECUTABLE (hl_f90_tsttable tsttable.f90)
+add_executable (hl_f90_tsttable tsttable.f90)
TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable " " " ")
-TARGET_LINK_LIBRARIES (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
+target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)