summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-01-11 15:09:18 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-01-11 15:09:18 (GMT)
commitf18d8a68bf44ee05d2c97914751265d531827d21 (patch)
tree71d3c29ccd3abd5ee03ce3d57daf5c7836726224 /fortran/test
parent88574bf85618adc96142bebf865ac2caf82c8f09 (diff)
parentc7e8a0788c68c2fe05b6b70591a499ad277c8fa5 (diff)
downloadhdf5-f18d8a68bf44ee05d2c97914751265d531827d21.zip
hdf5-f18d8a68bf44ee05d2c97914751265d531827d21.tar.gz
hdf5-f18d8a68bf44ee05d2c97914751265d531827d21.tar.bz2
Merge pull request #855 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'c7e8a0788c68c2fe05b6b70591a499ad277c8fa5': Correct whitespace HDFFV-10385 multi-config builders need folder set HDFFV-10385 fix packaging Fix typo HDFFV-8745 remove obsolete files HDFFV-10385 includes cleanup HDFFV-10385 - add release note HDFFV-10385 fix fortran references Correct folder typo HDFFV-8745 fix minor defects HDFFV-10385 fix platform errors HDFFV-10385 refactor CMAKE_BUILD_TYPE usage
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt29
1 files changed, 11 insertions, 18 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 3c3eb8f..9946aa0 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
@@ -34,25 +34,17 @@ set_target_properties (H5_test_buildiface PROPERTIES
if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
- if (WIN32)
- set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
- else ()
- set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- endif ()
+ set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE})
endif ()
-if (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${CMAKE_BUILD_TYPE})
-else ()
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-endif ()
-
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR})
+file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
+set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE})
#-----------------------------------------------------------------------------
# Add Test Lib
#-----------------------------------------------------------------------------
add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
+target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_C_LIB_TARGET}
@@ -66,6 +58,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
)
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
+ target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
${HDF5_F90_C_LIBSH_TARGET}
@@ -83,16 +76,16 @@ endif ()
set (CMD $<TARGET_FILE:H5_test_buildiface>)
add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/tf_gen.F90
+ OUTPUT ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
COMMAND ${CMD}
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
DEPENDS H5_test_buildiface
COMMENT "Generating the tf_gen.F90 file"
)
add_custom_target (H5testgen ALL
- DEPENDS ${HDF5_F90_BINARY_DIR}/tf_gen.F90
+ DEPENDS ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES GENERATED TRUE)
+set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
set (CMDSH $<TARGET_FILE:H5_test_buildiface>)
@@ -111,7 +104,7 @@ endif ()
set (HDF5_F90_TF_SOURCES
# generated files
- ${HDF5_F90_BINARY_DIR}/tf_gen.F90
+ ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
# normal distribution
tf.F90