summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-04-02 19:55:54 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-04-02 19:55:54 (GMT)
commitf39f4125630fb774baf5023a0e8aa9235308a97e (patch)
tree5c073b928c01254949dc57f1b133d3079a28b788
parent3e0eae188b28136ca7981ffcabeb41bae97c1bea (diff)
downloadhdf5-f39f4125630fb774baf5023a0e8aa9235308a97e.zip
hdf5-f39f4125630fb774baf5023a0e8aa9235308a97e.tar.gz
hdf5-f39f4125630fb774baf5023a0e8aa9235308a97e.tar.bz2
[svn-r26710] Update fortran cmake commands
-rw-r--r--fortran/examples/CMakeLists.txt35
1 files changed, 13 insertions, 22 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 81dff6e..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
@@ -42,18 +42,16 @@ 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} ${LIB_TYPE} " " " ")
- if (WIN32)
- set_property (TARGET f90_ex_${example}
- APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
- )
- endif (WIN32)
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)
@@ -61,17 +59,16 @@ if (HDF5_ENABLE_F2003)
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} ${LIB_TYPE} " " " ")
- if (WIN32)
- set_property (TARGET f03_ex_${example}
- APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS
- )
- endif (WIN32)
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)
@@ -79,12 +76,6 @@ 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 ${LIB_TYPE} " " " ")
- if (WIN32)
- set_property (TARGET f90_ex_ph5example
- APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
- )
- endif (WIN32)
target_link_libraries (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}