summaryrefslogtreecommitdiffstats
path: root/hl/fortran/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-05-08 21:50:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-05-08 21:50:29 (GMT)
commit7aeebec9463d18c3040ba7fa37464c00b64ab75e (patch)
tree0a7f00ec6357ce94c19f11c34c02d18b4bb01fe6 /hl/fortran/examples
parent0cc480d952e2e215f006fc172485fcbabc0f599f (diff)
parent0344785872020c4ef1de90cf57f286f1cf4ad2fc (diff)
downloadhdf5-7aeebec9463d18c3040ba7fa37464c00b64ab75e.zip
hdf5-7aeebec9463d18c3040ba7fa37464c00b64ab75e.tar.gz
hdf5-7aeebec9463d18c3040ba7fa37464c00b64ab75e.tar.bz2
Merge pull request #1047 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '0344785872020c4ef1de90cf57f286f1cf4ad2fc': (28 commits) Text cleanup Correct sentence punctuation. Add release note. Use set_property for MT flag Correct command usage Remove APPEND Fix typo Add missing test lib add missing folder to path Fix another command revert Missed a command revert Revert to old style for LINK_FLAGS gen expr not working LINK_FLAGS must be separate property sets Fix link flags syntax Revert refactor link flags refactor link flags to interface Refactor link flags Fix defs and additional MSVC items TRILABS-19 fix syntax for windows TRILABS-19 Link flags need - character ...
Diffstat (limited to 'hl/fortran/examples')
-rw-r--r--hl/fortran/examples/CMakeLists.txt34
1 files changed, 23 insertions, 11 deletions
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index af92efc..cc671f0 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -8,21 +8,33 @@ 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_include_directories (hl_f90_ex_${example}
+ PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src"
+ )
+ 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}
- ${HDF5_HL_F90_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
+ PRIVATE
+ ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
+ )
+# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+# )
+# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+# )
+ if(MSVC)
+ set_property(TARGET hl_f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ set_target_properties (hl_f90_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/hl/fortran
)
- 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)
-
endforeach ()
if (BUILD_TESTING)
-
include (CMakeTests.cmake)
-
endif ()