diff options
-rw-r--r-- | fortran/examples/CMakeLists.txt | 12 | ||||
-rw-r--r-- | hl/fortran/test/CMakeLists.txt | 9 | ||||
-rw-r--r-- | hl/tools/h5watch/CMakeLists.txt | 14 |
3 files changed, 19 insertions, 16 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index fd98944..200a999 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -6,12 +6,6 @@ PROJECT (HDF5_F90_EXAMPLES C CXX Fortran) # -------------------------------------------------------------------- #----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- - -set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src") - -#----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- set (examples @@ -47,6 +41,7 @@ foreach (example ${examples}) ${HDF5_LIB_TARGET} ) target_include_directories (f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set_property(TARGET f90_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static") set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran @@ -60,6 +55,7 @@ foreach (example ${examples}) ${HDF5_LIBSH_TARGET} ) target_include_directories (f90_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_property(TARGET f90_ex_${example}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared") set_target_properties (f90_ex_${example}-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran @@ -76,6 +72,7 @@ foreach (example ${F2003_examples}) ${HDF5_LIB_TARGET} ) target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set_property(TARGET f03_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static") set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 @@ -89,6 +86,7 @@ foreach (example ${F2003_examples}) ${HDF5_LIBSH_TARGET} ) target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_property(TARGET f03_ex_${example}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared") set_target_properties (f03_ex_${example}-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 @@ -105,6 +103,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) ${HDF5_LIB_TARGET} ) target_include_directories (f90_ex_ph5example PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set_property(TARGET f90_ex_ph5example APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static") set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran @@ -118,6 +117,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) ${HDF5_LIBSH_TARGET} ) target_include_directories (f90_ex_ph5example-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_property(TARGET f90_ex_ph5example-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared") set_target_properties (f90_ex_ph5example-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 1ac16d9..7e7740d 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -4,13 +4,13 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- # Add Tests #----------------------------------------------------------------------------- -set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_Fortran_MODULE_DIRECTORY};${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") #-- Adding test for hl_f90_tstds add_executable (hl_f90_tstds tstds.F90) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ") target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set_property(TARGET hl_f90_tstds APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) @@ -18,6 +18,7 @@ if (BUILD_SHARED_LIBS) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ") target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) target_include_directories (hl_f90_tstds-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_property(TARGET hl_f90_tstds-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") set_target_properties (hl_f90_tstds-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran @@ -30,6 +31,7 @@ add_executable (hl_f90_tstlite tstlite.F90) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ") target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET}) target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set_property(TARGET hl_f90_tstlite APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) @@ -37,6 +39,7 @@ if (BUILD_SHARED_LIBS) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ") target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET}) target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_property(TARGET hl_f90_tstlite-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") set_target_properties (hl_f90_tstlite-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran @@ -49,6 +52,7 @@ add_executable (hl_f90_tstimage tstimage.F90) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ") target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set_property(TARGET hl_f90_tstimage APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) @@ -56,6 +60,7 @@ if (BUILD_SHARED_LIBS) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ") target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) target_include_directories (hl_f90_tstimage-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_property(TARGET hl_f90_tstimage-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") set_target_properties (hl_f90_tstimage-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran @@ -68,6 +73,7 @@ add_executable (hl_f90_tsttable tsttable.F90) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ") target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET}) target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set_property(TARGET hl_f90_tsttable APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) @@ -75,6 +81,7 @@ if (BUILD_SHARED_LIBS) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ") target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET}) target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_property(TARGET hl_f90_tsttable-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src") set_target_properties (hl_f90_tsttable-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index 165c8ec..fdcf887 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required (VERSION 3.10) PROJECT (HDF5_HL_TOOLS_H5WATCH) -set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - #----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- @@ -11,25 +9,21 @@ set (H5WATCH_SOURCES ) #-- Add h5watch program -include_directories (${HDF5_TOOLS_DIR}/lib) -include_directories (${HDF5_HL_TOOLS_DIR}/src) -include_directories (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}) - add_executable (h5watch ${H5WATCH_SOURCES}) +set_property(TARGET h5watch APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") TARGET_C_PROPERTIES (h5watch STATIC " " " ") target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5watch PROPERTIES FOLDER tools/hl) if (BUILD_TESTING) - include_directories (${HDF5_TEST_SRC_DIR}) - include_directories(${HDF5_HL_SRC_DIR}/test) #-- Add swmr_check_compat_vfd program set (hl_swmr_check_compat_vfd_SOURCES ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c ) add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SOURCES}) + set_property(TARGET hl_swmr_check_compat_vfd APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC " " " ") - target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_LIB_TARGET}) set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl) #-- Add extend_dset program @@ -37,11 +31,13 @@ if (BUILD_TESTING) ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c ) add_executable (extend_dset ${extend_dset_SOURCES}) + set_property(TARGET extend_dset APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") TARGET_C_PROPERTIES (extend_dset STATIC " " " ") target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (extend_dset PROPERTIES FOLDER tools/hl) add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c) + set_property(TARGET h5watchgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") TARGET_C_PROPERTIES (h5watchgentest STATIC " " " ") target_link_libraries (h5watchgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl) |