diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-09-09 16:30:23 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-09-09 16:30:23 (GMT) |
commit | bed127641399ec6c6e1479b7c394fd3a4eb56438 (patch) | |
tree | bd923e43fb7c5a004a94f038b6c087d1d170f739 /perform/CMakeLists.txt | |
parent | a5b16bbd75dddc008480448d458cb0a1b7ba70fa (diff) | |
download | hdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.zip hdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.tar.gz hdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.tar.bz2 |
[svn-r19361] Move Windows specific compile and link flags to macros
Diffstat (limited to 'perform/CMakeLists.txt')
-rw-r--r-- | perform/CMakeLists.txt | 99 |
1 files changed, 9 insertions, 90 deletions
diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt index 6168bb3..2c0c517 100644 --- a/perform/CMakeLists.txt +++ b/perform/CMakeLists.txt @@ -19,16 +19,7 @@ SET (h5perf_serial_SRCS ) ADD_EXECUTABLE (h5perf_serial ${h5perf_serial_SRCS}) H5_NAMING (h5perf_serial) -IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (h5perf_serial - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) -ENDIF (WIN32) +TARGET_WIN_PROPERTIES (h5perf_serial) TARGET_LINK_LIBRARIES (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>) @@ -39,16 +30,7 @@ SET (chunk_SRCS ) ADD_EXECUTABLE(chunk ${chunk_SRCS}) H5_NAMING (chunk) -IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (chunk - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) -ENDIF (WIN32) +TARGET_WIN_PROPERTIES (chunk) TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME chunk COMMAND $<TARGET_FILE:chunk>) @@ -59,16 +41,7 @@ SET (iopipe_SRCS ) ADD_EXECUTABLE (iopipe ${iopipe_SRCS}) H5_NAMING (iopipe) -IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (iopipe - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) -ENDIF (WIN32) +TARGET_WIN_PROPERTIES (iopipe) TARGET_LINK_LIBRARIES (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME iopipe COMMAND $<TARGET_FILE:iopipe>) @@ -79,16 +52,7 @@ SET (overhead_SRCS ) ADD_EXECUTABLE (overhead ${overhead_SRCS}) H5_NAMING (overhead) -IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (overhead - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) -ENDIF (WIN32) +TARGET_WIN_PROPERTIES (overhead) TARGET_LINK_LIBRARIES (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME overhead COMMAND $<TARGET_FILE:overhead>) @@ -99,16 +63,7 @@ SET (perf_meta_SRCS ) ADD_EXECUTABLE (perf_meta ${perf_meta_SRCS}) H5_NAMING (perf_meta) -IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (perf_meta - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) -ENDIF (WIN32) +TARGET_WIN_PROPERTIES (perf_meta) TARGET_LINK_LIBRARIES (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME perf_meta COMMAND $<TARGET_FILE:perf_meta>) @@ -119,16 +74,7 @@ SET (zip_perf_SRCS ) ADD_EXECUTABLE (zip_perf ${zip_perf_SRCS}) H5_NAMING (zip_perf) -IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (zip_perf - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) -ENDIF (WIN32) +TARGET_WIN_PROPERTIES (zip_perf) TARGET_LINK_LIBRARIES (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) ADD_TEST (NAME zip_perf COMMAND $<TARGET_FILE:zip_perf> "-h") @@ -142,16 +88,7 @@ IF (H5_HAVE_PARALLEL) ) ADD_EXECUTABLE (h5perf ${h5perf_SRCS}) H5_NAMING (h5perf) - IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (h5perf - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) - ENDIF (WIN32) + TARGET_WIN_PROPERTIESS (h5perf) TARGET_LINK_LIBRARIES (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>) @@ -162,16 +99,7 @@ IF (H5_HAVE_PARALLEL) ) ADD_EXECUTABLE (benchpar ${benchpar_SRCS}) H5_NAMING (benchpar) - IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (benchpar - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) - ENDIF (WIN32) + TARGET_WIN_PROPERTIES (benchpar) TARGET_LINK_LIBRARIES (benchpar ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>) @@ -182,16 +110,7 @@ IF (H5_HAVE_PARALLEL) ) ADD_EXECUTABLE (mpi-perf ${mpi-perf_SRCS}) H5_NAMING (mpi-perf) - IF (WIN32) - IF (MSVC) - IF (NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES (mpi-perf - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - ) - ENDIF (NOT BUILD_SHARED_LIBS) - ENDIF (MSVC) - ENDIF (WIN32) + TARGET_WIN_PROPERTIES (mpi-perf) TARGET_LINK_LIBRARIES (mpi-perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME mpi-perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:mpi-perf>) |