summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
Diffstat (limited to 'hl')
-rw-r--r--hl/CMakeLists.txt2
-rw-r--r--hl/fortran/CMakeLists.txt22
-rw-r--r--hl/fortran/examples/CMakeLists.txt6
-rw-r--r--hl/fortran/src/CMakeLists.txt49
-rw-r--r--hl/fortran/test/CMakeLists.txt12
5 files changed, 26 insertions, 65 deletions
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index 9ce3043..0c0ad91 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 2.8)
-PROJECT (HDF5_HL)
+PROJECT (HDF5_HL C CXX)
#-----------------------------------------------------------------------------
# Shared Libs
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..d6f522c 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -5,50 +5,38 @@ 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
-)
-LINK_DIRECTORIES (
- ${CMAKE_Fortran_MODULE_DIRECTORY}
- ${HDF5_HL_F90_BINARY_DIR}
+ ${HDF5_F90_SRC_DIR}/src
${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_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 +59,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/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 280089a..4fb2614 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -5,12 +5,12 @@ 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}
-)
+#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 (