summaryrefslogtreecommitdiffstats
path: root/fortran/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-03-25 22:08:46 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-03-25 22:08:46 (GMT)
commit451a91e53bdc0f930c2acf382d14a5e2fd9cb2d9 (patch)
tree145b94b29e9cc5b7f9c6b2477d076f793430d62e /fortran/examples
parentd3114a96da64de8ea987f7c1714f8ad4a2474f4e (diff)
downloadhdf5-451a91e53bdc0f930c2acf382d14a5e2fd9cb2d9.zip
hdf5-451a91e53bdc0f930c2acf382d14a5e2fd9cb2d9.tar.gz
hdf5-451a91e53bdc0f930c2acf382d14a5e2fd9cb2d9.tar.bz2
[svn-r26594] Merge macros and fortran changes from dual_binary feature.
Tested: local linux
Diffstat (limited to 'fortran/examples')
-rw-r--r--fortran/examples/CMakeLists.txt49
1 files changed, 22 insertions, 27 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 1f59f32..2bf0bf6 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -8,7 +8,7 @@ PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Define Sources
@@ -41,57 +41,52 @@ set (F2003_examples
foreach (example ${examples})
add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f90_ex_${example} ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (f90_ex_${example} " " " ")
- if (WIN32)
- set_property (TARGET f90_ex_${example}
- APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
- )
- endif (WIN32)
+ TARGET_FORTRAN_PROPERTIES (f90_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (f90_ex_${example} PROPERTIES FOLDER examples/fortran)
+ target_include_directories (f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ set_target_properties (f90_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+ )
endforeach (example ${examples})
if (HDF5_ENABLE_F2003)
foreach (example ${F2003_examples})
add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f03_ex_${example} ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (f03_ex_${example} " " " ")
- if (WIN32)
- set_property (TARGET f03_ex_${example}
- APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS
- )
- endif (WIN32)
+ TARGET_FORTRAN_PROPERTIES (f03_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (f03_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (f03_ex_${example} PROPERTIES FOLDER examples/fortran03)
+ target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ set_target_properties (f03_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran03
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+ )
endforeach (example ${F2003_examples})
endif (HDF5_ENABLE_F2003)
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example " " " ")
- if (WIN32)
- set_property (TARGET f90_ex_ph5example
- APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
- )
- endif (WIN32)
+ TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example ${LIB_TYPE} " " " ")
target_link_libraries (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
${MPI_Fortran_LIBRARIES}
)
- set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (f90_ex_ph5example PROPERTIES FOLDER examples/fortran)
+ target_include_directories (f90_ex_ph5example PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ set_target_properties (f90_ex_ph5example PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+ )
endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
if (BUILD_TESTING)