summaryrefslogtreecommitdiffstats
path: root/hl/fortran/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-04-30 14:03:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-04-30 14:03:29 (GMT)
commit76d0cc0ca992e3f373c64ddc578ebfed09c77455 (patch)
treefc76278eee4526f38688aff3d0b5afd1431ff74c /hl/fortran/examples
parent80afe46e70a824086f4744081eaf92836639109d (diff)
downloadhdf5-76d0cc0ca992e3f373c64ddc578ebfed09c77455.zip
hdf5-76d0cc0ca992e3f373c64ddc578ebfed09c77455.tar.gz
hdf5-76d0cc0ca992e3f373c64ddc578ebfed09c77455.tar.bz2
TRILABS-19 Refactor fortran properties
Diffstat (limited to 'hl/fortran/examples')
-rw-r--r--hl/fortran/examples/CMakeLists.txt26
1 files changed, 17 insertions, 9 deletions
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index db047d0..7805ff4 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -8,17 +8,25 @@ set (examples
foreach (example ${examples})
add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- target_include_directories (hl_f90_ex_${example} PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src"
+ target_include_directories (hl_f90_ex_${example}
+ PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src"
)
- TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC)
- target_link_libraries (hl_f90_ex_${example} PRIVATE
- ${HDF5_HL_F90_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
+ target_compile_options(hl_f90_ex_${example}
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (hl_f90_ex_${example}
+ PRIVATE
+ ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
+ )
+ set_target_properties (hl_f90_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/hl/fortran
+ LINK_FLAGS
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"/SUBSYSTEM:CONSOLE">
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
)
- set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
endforeach ()