summaryrefslogtreecommitdiffstats
path: root/hl/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-01-09 22:26:12 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-01-09 22:26:12 (GMT)
commit3e0c6530dc3a6008f800b25eb55c1422d853cc67 (patch)
tree45ea417cc70da10bcc85e9cbbf6649b422b0a860 /hl/fortran
parentbe42e047913c332f148db3b8a9180e6a2eb5c23a (diff)
downloadhdf5-3e0c6530dc3a6008f800b25eb55c1422d853cc67.zip
hdf5-3e0c6530dc3a6008f800b25eb55c1422d853cc67.tar.gz
hdf5-3e0c6530dc3a6008f800b25eb55c1422d853cc67.tar.bz2
HDFFV-10385 fix platform errors
Diffstat (limited to 'hl/fortran')
-rw-r--r--hl/fortran/src/CMakeLists.txt23
1 files changed, 11 insertions, 12 deletions
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 90ee19b..47e8236 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -37,12 +37,9 @@ set_target_properties (H5HL_buildiface PROPERTIES
)
if (BUILD_SHARED_LIBS)
- file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")
- CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_BUILD_TYPE})
+ set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE})
endif ()
-CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_BUILD_TYPE})
+set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE})
#-----------------------------------------------------------------------------
# Setup include Directories
@@ -70,6 +67,7 @@ set_source_files_properties (${HDF5_HL_F90_C_SOURCES} PROPERTIES LANGUAGE C)
set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
+target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static)
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${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}")
@@ -83,6 +81,7 @@ set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
+ target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared)
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}")
@@ -109,18 +108,18 @@ set (HDF5_HL_F90_F_BASE_SOURCES
set (CMD $<TARGET_FILE:H5HL_buildiface>)
add_custom_command (
- OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
+ OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
COMMAND ${CMD}
- WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR}
+ WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR}/static
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 files"
)
add_custom_target (H5HLgen ALL
- DEPENDS ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
+ DEPENDS ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
)
set_source_files_properties (
- ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90
- ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
+ ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90
+ ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5TBff_gen.F90
PROPERTIES GENERATED TRUE
)
if (BUILD_SHARED_LIBS)
@@ -146,8 +145,8 @@ set (HDF5_HL_F90_F_SOURCES
${HDF5_HL_F90_F_BASE_SOURCES}
# generated files
- ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90
- ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
+ ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90
+ ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5TBff_gen.F90
)
set_source_files_properties (${HDF5_HL_F90_F_SOURCES} PROPERTIES LANGUAGE Fortran)