summaryrefslogtreecommitdiffstats
path: root/hl/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-02-22 14:55:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-02-22 14:55:04 (GMT)
commit5d320f5c89fdb0a830a9f435e32c3cde3a8bd863 (patch)
treea79e9e3fbda396ebdf70e67b82d75144449af07d /hl/fortran
parentcab5c372bfc34773014c13a38ca8dc30d5a89441 (diff)
downloadhdf5-5d320f5c89fdb0a830a9f435e32c3cde3a8bd863.zip
hdf5-5d320f5c89fdb0a830a9f435e32c3cde3a8bd863.tar.gz
hdf5-5d320f5c89fdb0a830a9f435e32c3cde3a8bd863.tar.bz2
[svn-r20141] Bring 1.8 r20139 cmake and windows changes to trunk
Diffstat (limited to 'hl/fortran')
-rw-r--r--hl/fortran/CMakeLists.txt22
-rw-r--r--hl/fortran/examples/CMakeLists.txt6
-rw-r--r--hl/fortran/src/CMakeLists.txt52
-rwxr-xr-xhl/fortran/src/H5LTf90proto.h4
-rw-r--r--hl/fortran/test/CMakeLists.txt6
5 files changed, 23 insertions, 67 deletions
diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt
index 4c2256c..1fd6de0 100644
--- a/hl/fortran/CMakeLists.txt
+++ b/hl/fortran/CMakeLists.txt
@@ -1,25 +1,5 @@
cmake_minimum_required (VERSION 2.8)
-PROJECT(HDF5_HL_F90 C CXX Fortran)
-
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_F90_SRC_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR})
-INCLUDE_DIRECTORIES (${HDF5_F90_SRC_BINARY_DIR})
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY})
-
-LINK_DIRECTORIES (${HDF5_SRC_DIR} ${HDF5_F90_SRC_DIR}/src ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
-
-#-----------------------------------------------------------------------------
-# Add debug information (intel Fortran : JB)
-#-----------------------------------------------------------------------------
-IF (CMAKE_Fortran_COMPILER MATCHES ifort)
- IF (WIN32)
- SET (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
- ENDIF (WIN32)
-ENDIF (CMAKE_Fortran_COMPILER MATCHES ifort)
+PROJECT (HDF5_HL_F90 C CXX Fortran)
#-----------------------------------------------------------------------------
# List Source files
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index 698407d..2f56297 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -4,12 +4,10 @@ PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
-LINK_DIRECTORIES (
+INCLUDE_DIRECTORIES (
${CMAKE_Fortran_MODULE_DIRECTORY}
- ${HDF5_HL_F90_BINARY_DIR}
${HDF5_F90_BINARY_DIR}
- ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+ ${HDF5_F90_SRC_DIR}/src
)
SET (examples
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index ca0a35f..763a315 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -5,50 +5,39 @@ PROJECT(HDF5_HL_F90_SRC C CXX Fortran)
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (
- ${CMAKE_Fortran_MODULE_DIRECTORY}
- ${HDF5_F90_BINARY_DIR}
- ${HDF5_F90_SRC_DIR}/src
- ${HDF5_F90_SRC_BINARY_DIR}
- ${HDF5_HL_F90_SRC_SOURCE_DIR}
${HDF5_HL_SRC_DIR}/src
+ ${HDF5_F90_SRC_DIR}/src
+ ${HDF5_F90_BINARY_DIR
+ ${CMAKE_Fortran_MODULE_DIRECTORY}}
)
-LINK_DIRECTORIES (
- ${CMAKE_Fortran_MODULE_DIRECTORY}
- ${HDF5_HL_F90_BINARY_DIR}
- ${HDF5_F90_BINARY_DIR}
- ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-)
+
#-----------------------------------------------------------------------------
-# List Source files
+# hl_f90CStub lib
#-----------------------------------------------------------------------------
-SET (HDF5_HL_F90_F_SRCS
- ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90
- ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90
- ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90
-)
-
SET (HDF5_HL_F90_C_SRCS
${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 (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
+SET_SOURCE_FILES_PROPERTIES (${HDF5_HL_F90_HEADERS} PROPERTIES LANGUAGE C)
ADD_LIBRARY (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
-TARGET_LINK_LIBRARIES (${HDF5_HL_F90_C_LIB_TARGET}
- ${HDF5_F90_C_LIB_TARGET}
- ${HDF5_HL_LIB_TARGET}
-)
-#
-# To Ensure that generated files are built, we must force a dependency
-ADD_DEPENDENCIES(${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_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_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT
- "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}"
+#-----------------------------------------------------------------------------
+# Fortran Modules
+#-----------------------------------------------------------------------------
+SET (HDF5_HL_F90_F_SRCS
+ ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90
+ ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90
+ ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90
)
-H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE})
ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
SET (SHARED_LINK_FLAGS " ")
@@ -71,18 +60,13 @@ IF (WIN32 AND NOT CYGWIN)
ENDIF (WIN32 AND NOT CYGWIN)
TARGET_FORTRAN_WIN_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}
-)
+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})
-ADD_DEPENDENCIES (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET})
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-
INSTALL (
DIRECTORY
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/
diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h
index 3e45531..c0de5ea 100755
--- a/hl/fortran/src/H5LTf90proto.h
+++ b/hl/fortran/src/H5LTf90proto.h
@@ -23,8 +23,8 @@
#include <string.h>
-HDF5_HL_F90CSTUBDLL char* HD5f2cstring (_fcd fdesc, int len);
-HDF5_HL_F90CSTUBDLL void HD5packFstring (char *src, char *dest, size_t len);
+H5_FCDLL char* HD5f2cstring (_fcd fdesc, int len);
+H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len);
/*
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 280089a..c9e236e 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -5,12 +5,6 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
# Add Tests
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
-LINK_DIRECTORIES (
- ${CMAKE_Fortran_MODULE_DIRECTORY}
- ${HDF5_HL_F90_BINARY_DIR}
- ${HDF5_F90_BINARY_DIR}
- ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-)
# Remove any output file left over from previous test run
ADD_TEST (