summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-16 17:15:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-16 17:15:29 (GMT)
commitec13e5f872108a14b605b6b0e7d6cb7989ec76f8 (patch)
tree620284a6f74d80f505eb0d41778ab594f15ebb21 /fortran
parent2277865c6083e9c34369606dfcd3e551af891978 (diff)
downloadhdf5-ec13e5f872108a14b605b6b0e7d6cb7989ec76f8.zip
hdf5-ec13e5f872108a14b605b6b0e7d6cb7989ec76f8.tar.gz
hdf5-ec13e5f872108a14b605b6b0e7d6cb7989ec76f8.tar.bz2
OESS-98 add CMake option to build plugins project within hdf5
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/CMakeLists.txt12
-rw-r--r--fortran/src/CMakeLists.txt8
-rw-r--r--fortran/test/CMakeLists.txt6
3 files changed, 13 insertions, 13 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 02a71c3..610ee8c 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -46,7 +46,7 @@ foreach (example ${examples})
PRIVATE
"${CMAKE_Fortran_MODULE_DIRECTORY}/static"
"${HDF5_SRC_DIR}"
- "${HDF5_BINARY_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}/static"
)
@@ -61,7 +61,7 @@ foreach (example ${examples})
PRIVATE
"${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
"${HDF5_SRC_DIR}"
- "${HDF5_BINARY_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}/shared"
)
@@ -87,7 +87,7 @@ foreach (example ${F2003_examples})
PRIVATE
"${CMAKE_Fortran_MODULE_DIRECTORY}/static"
"${HDF5_SRC_DIR}"
- "${HDF5_BINARY_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}/static"
)
@@ -102,7 +102,7 @@ foreach (example ${F2003_examples})
PRIVATE
"${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
"${HDF5_SRC_DIR}"
- "${HDF5_BINARY_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}/shared"
)
@@ -128,7 +128,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
PRIVATE
"${CMAKE_Fortran_MODULE_DIRECTORY}/static"
"${HDF5_SRC_DIR}"
- "${HDF5_BINARY_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}/static"
"$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
@@ -149,7 +149,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
PRIVATE
"${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
"${HDF5_SRC_DIR}"
- "${HDF5_BINARY_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}"
"${HDF5_F90_BINARY_DIR}/shared"
"$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 986cc79..67d54b9 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -40,7 +40,7 @@ set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
#-----------------------------------------------------------------------------
add_executable (H5_buildiface ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90)
-target_include_directories (H5_buildiface PRIVATE "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
+target_include_directories (H5_buildiface PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
#if (BUILD_SHARED_LIBS)
# target_compile_definitions(H5_buildiface PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>)
#endif ()
@@ -71,7 +71,7 @@ add_executable (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
)
-target_include_directories (H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (H5match_types PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
@@ -145,7 +145,7 @@ set (f90CStub_C_SHHDRS
if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
target_include_directories (${HDF5_F90_C_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_F90_C_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -163,7 +163,7 @@ endif ()
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_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_F90_C_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 355220f..df83c9c 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -9,7 +9,7 @@ project (HDF5_FORTRAN_TESTS C Fortran)
add_executable (H5_test_buildiface ${HDF5_F90_SRC_DIR}/test/H5_test_buildiface.F90)
target_include_directories (H5_test_buildiface
PRIVATE
- ${HDF5_BINARY_DIR} ${HDF5_F90_BINARY_DIR}
+ ${HDF5_SRC_BINARY_DIR} ${HDF5_F90_BINARY_DIR}
)
#if (BUILD_SHARED_LIBS)
# target_compile_definitions(H5_test_buildiface
@@ -45,7 +45,7 @@ if (NOT BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c t.h)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
target_include_directories (${HDF5_F90_C_TEST_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -62,7 +62,7 @@ if (NOT BUILD_SHARED_LIBS)
else ()
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c t.h)
target_include_directories (${HDF5_F90_C_TEST_LIBSH_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")