summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-08-04 15:21:15 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-08-04 15:21:15 (GMT)
commit5f232b2c91b9eb7f365da3aeb923b3bb4cbab19f (patch)
treeca19f151ca1b7217b57a98219060ac040e8fc57e /fortran
parent4eb2b767378b36cb58c8ab212ea169a0ae017013 (diff)
downloadhdf5-5f232b2c91b9eb7f365da3aeb923b3bb4cbab19f.zip
hdf5-5f232b2c91b9eb7f365da3aeb923b3bb4cbab19f.tar.gz
hdf5-5f232b2c91b9eb7f365da3aeb923b3bb4cbab19f.tar.bz2
[svn-r21171] Commit HDFFV-5929 winthreads define fix
Change reference of generated executables in src and fortran/src to use $<TARGETFILE:xxx> format. Tested: local linux
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/CMakeLists.txt25
1 files changed, 8 insertions, 17 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index d5cbc1b..ef858c6 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -2,15 +2,6 @@ cmake_minimum_required (VERSION 2.8)
PROJECT (HDF5_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------
-# When building utility executables that generate other (source) files :
-# we make use of the following variables defined in the root CMakeLists.
-# Certain systems may add /Debug or /Release to output paths
-# and we need to call the executable from inside the CMake configuration
-#-----------------------------------------------------------------------------
-#inherit EXE_EXT from parent HDF5 cmake project
-#inherit CFG_INIT from parent HDF5 cmake project
-
-#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
# H5test_kind(_SIZEOF).f90 used to generate H5fortran_detect.f90
# H5fortran_detect.f90 used to generate H5fort_type_defines.h
@@ -39,7 +30,7 @@ IF (WIN32 AND MSVC)
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
-SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5test_FortranHavekind${EXE_EXT})
+SET (CMD $<TARGET_FILE:H5test_FortranHavekind>)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
COMMAND ${CMD}
@@ -63,9 +54,9 @@ IF (WIN32 AND MSVC)
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
ENDIF (WIN32 AND MSVC)
-SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
+SET_TARGET_PROPERTIES (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran)
-SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5fortran_detect${EXE_EXT})
+SET (CMD $<TARGET_FILE:H5fortran_detect>)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
COMMAND ${CMD}
@@ -80,7 +71,7 @@ ADD_EXECUTABLE (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
)
-SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5match_types${EXE_EXT})
+SET (CMD $<TARGET_FILE:H5match_types>)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/H5fortran_types.f90
@@ -189,16 +180,16 @@ SET (SHARED_LINK_FLAGS " ")
IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS
- BUILD_HDF5_DLL
- )
+ APPEND PROPERTY COMPILE_DEFINITIONS
+ BUILD_HDF5_DLL
+ )
IF (MSVC)
SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def")
ENDIF (MSVC)
ENDIF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
+ HDF5F90_WINDOWS
)
ENDIF (WIN32 AND NOT CYGWIN)
TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${SHARED_LINK_FLAGS})