diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-07-24 16:08:47 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-07-24 16:08:47 (GMT) |
commit | 34adba4a0c131afe49a75e8e7d92f1e986c1b540 (patch) | |
tree | 8e196a9fab1502a45d0d05a190fb1f90ec94dbed /fortran/src | |
parent | ab0b1a00aff3bee4a3cf0d31614368935c435b6f (diff) | |
download | hdf5-34adba4a0c131afe49a75e8e7d92f1e986c1b540.zip hdf5-34adba4a0c131afe49a75e8e7d92f1e986c1b540.tar.gz hdf5-34adba4a0c131afe49a75e8e7d92f1e986c1b540.tar.bz2 |
HDFFV-10845, 10529 and CMake changes from develop
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/CMakeLists.txt | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 82a1eb6..dda9c5a 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -84,7 +84,7 @@ if (NOT ONLY_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 - COMMAND $<TARGET_FILE:H5match_types> + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types> WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static DEPENDS H5match_types ) @@ -95,7 +95,7 @@ if (BUILD_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 - COMMAND $<TARGET_FILE:H5match_types> + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types> WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared DEPENDS H5match_types ) @@ -183,7 +183,7 @@ set (f90_F_GEN_SOURCES if (NOT ONLY_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 - COMMAND $<TARGET_FILE:H5_buildiface> + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_buildiface> WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static DEPENDS ${f90_F_GEN_SOURCES} COMMENT "Generating the H5_gen.F90 file" @@ -197,7 +197,7 @@ endif () if (BUILD_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 - COMMAND $<TARGET_FILE:H5_buildiface> + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_buildiface> WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared DEPENDS ${f90_F_GEN_SOURCES} COMMENT "Generating the H5_gen.F90 shared file" @@ -355,18 +355,32 @@ install ( ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h - if (NOT ONLY_SHARED_LIBS) - ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 - else () - ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 - endif () DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT fortheaders ) +if (NOT ONLY_SHARED_LIBS) + install ( + FILES + ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h + ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 + DESTINATION + ${HDF5_INSTALL_INCLUDE_DIR} + COMPONENT + fortheaders + ) +else () + install ( + FILES + ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h + ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 + DESTINATION + ${HDF5_INSTALL_INCLUDE_DIR} + COMPONENT + fortheaders + ) +endif () if (NOT ONLY_SHARED_LIBS) set (mod_files @@ -491,7 +505,7 @@ install ( COMPONENT fortlibraries ) -if (NOT WIN32) +if (NOT WIN32 AND NOT MINGW) set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER}) configure_file ( ${HDF_RESOURCES_DIR}/libh5cc.in |