summaryrefslogtreecommitdiffstats
path: root/src
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 /src
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 'src')
-rw-r--r--src/CMakeLists.txt21
-rw-r--r--src/H5private.h10
2 files changed, 11 insertions, 20 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7fd40c0..016ac2a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -614,27 +614,15 @@ INCLUDE_DIRECTORIES (${HDF5_SOURCE_DIR})
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR})
#-----------------------------------------------------------------------------
-# 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 H5Detect utility which generates H5Tinit with platform
# specific type checks inside
#-----------------------------------------------------------------------------
-SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5detect${EXE_EXT})
-IF (XCODE)
- SET (CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5detect")
-ENDIF (XCODE)
ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
IF (MSVC)
TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
ENDIF (MSVC)
+SET (CMD $<TARGET_FILE:H5detect>)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c
COMMAND ${CMD}
@@ -642,18 +630,15 @@ ADD_CUSTOM_COMMAND (
DEPENDS H5detect
)
-SET (CMDL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5make_libsettings${EXE_EXT})
-IF (XCODE)
- SET (CMDL "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5make_libsettings")
-ENDIF (XCODE)
ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
IF (MSVC)
TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib")
ENDIF (MSVC)
+SET (CMD $<TARGET_FILE:H5make_libsettings>)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
- COMMAND ${CMDL}
+ COMMAND ${CMD}
ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c
DEPENDS H5make_libsettings
)
diff --git a/src/H5private.h b/src/H5private.h
index 9978cd1..d87ad90 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -30,11 +30,17 @@
/* include the pthread header */
#ifdef H5_HAVE_THREADSAFE
+ #ifdef _WIN32
+ #ifndef H5_HAVE_WIN_THREADS
#ifdef H5_HAVE_PTHREAD_H
#include <pthread.h>
-#else /* H5_HAVE_PTHREAD_H */
-#define H5_HAVE_WIN_THREADS
#endif /* H5_HAVE_PTHREAD_H */
+ #endif /* H5_HAVE_WIN_THREADS */
+ #else /* _WIN32 */
+ #ifdef H5_HAVE_PTHREAD_H
+ #include <pthread.h>
+ #endif /* H5_HAVE_PTHREAD_H */
+ #endif /* _WIN32 */
#endif /* H5_HAVE_THREADSAFE */
/*