summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-01-11 16:48:14 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-01-11 16:48:14 (GMT)
commita2f2e1f4cf44f305a12c674a37c120d26ce3362b (patch)
treea0ca186533642c0a78007ede6191a25c25b5e4ae /fortran
parentf18d8a68bf44ee05d2c97914751265d531827d21 (diff)
downloadhdf5-a2f2e1f4cf44f305a12c674a37c120d26ce3362b.zip
hdf5-a2f2e1f4cf44f305a12c674a37c120d26ce3362b.tar.gz
hdf5-a2f2e1f4cf44f305a12c674a37c120d26ce3362b.tar.bz2
Fix fortran cmake variable usage
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/CMakeLists.txt6
-rw-r--r--fortran/test/CMakeLists.txt30
2 files changed, 18 insertions, 18 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index c377d62..7ed5fef 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -71,7 +71,7 @@ endif ()
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE})
-INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
+INCLUDE_DIRECTORIES (${HDF5_F90_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
#-----------------------------------------------------------------------------
add_executable (H5match_types
@@ -134,7 +134,7 @@ set (f90CStub_C_SHHDRS
)
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
-target_include_directories(${HDF5_F90_C_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static)
+target_include_directories(${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
@@ -148,7 +148,7 @@ set (install_targets ${HDF5_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
- target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared)
+ target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}")
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 9946aa0..9f2d593 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 (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_FORTRAN_TESTS_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
@@ -33,10 +33,10 @@ set_target_properties (H5_test_buildiface PROPERTIES
)
if (BUILD_SHARED_LIBS)
- file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
+ file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared")
set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE})
endif ()
-file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
+file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/static")
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE})
#-----------------------------------------------------------------------------
@@ -44,7 +44,7 @@ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYP
#-----------------------------------------------------------------------------
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_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PUBLIC ${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}
@@ -58,7 +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_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PUBLIC ${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}
@@ -76,35 +76,35 @@ endif ()
set (CMD $<TARGET_FILE:H5_test_buildiface>)
add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
+ OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
COMMAND ${CMD}
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
+ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static
DEPENDS H5_test_buildiface
COMMENT "Generating the tf_gen.F90 file"
)
add_custom_target (H5testgen ALL
- DEPENDS ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
+ DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE)
+set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
set (CMDSH $<TARGET_FILE:H5_test_buildiface>)
add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90
+ OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
COMMAND ${CMDSH}
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
+ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared
DEPENDS H5_test_buildiface
COMMENT "Generating the tf_gen.F90 shared file"
)
add_custom_target (H5testgenSH ALL
- DEPENDS ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90
+ DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
)
- set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE)
+ set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE)
endif ()
set (HDF5_F90_TF_SOURCES
# generated files
- ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
+ ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
# normal distribution
tf.F90
@@ -113,7 +113,7 @@ set_source_files_properties (${HDF5_F90_TF_SOURCES} PROPERTIES LANGUAGE Fortran)
if (BUILD_SHARED_LIBS)
set (HDF5_F90_TF_SOURCES_SHARED
# generated file
- ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90
+ ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
# normal distribution
tf.F90