summaryrefslogtreecommitdiffstats
path: root/hl/fortran/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-04-26 21:41:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-04-26 21:41:04 (GMT)
commit2347bffaa2d48b62a22575fbc93b1f5c2716d8d4 (patch)
tree963395e7cd4bd66761194c8cee840906b16abb3a /hl/fortran/examples/CMakeLists.txt
parentbc9a773b994cde788e97e5e998eb5fcd21ec8a39 (diff)
downloadhdf5-2347bffaa2d48b62a22575fbc93b1f5c2716d8d4.zip
hdf5-2347bffaa2d48b62a22575fbc93b1f5c2716d8d4.tar.gz
hdf5-2347bffaa2d48b62a22575fbc93b1f5c2716d8d4.tar.bz2
TRILABS-19 remove add_defintions and use generator expressions
Diffstat (limited to 'hl/fortran/examples/CMakeLists.txt')
-rw-r--r--hl/fortran/examples/CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index af92efc..db047d0 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -8,14 +8,15 @@ set (examples
foreach (example ${examples})
add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC " " " ")
- target_link_libraries (hl_f90_ex_${example}
+ 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_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)