summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-09-09 16:30:23 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-09-09 16:30:23 (GMT)
commitbed127641399ec6c6e1479b7c394fd3a4eb56438 (patch)
treebd923e43fb7c5a004a94f038b6c087d1d170f739 /hl
parenta5b16bbd75dddc008480448d458cb0a1b7ba70fa (diff)
downloadhdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.zip
hdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.tar.gz
hdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.tar.bz2
[svn-r19361] Move Windows specific compile and link flags to macros
Diffstat (limited to 'hl')
-rw-r--r--hl/c++/examples/CMakeLists.txt22
-rw-r--r--hl/c++/test/CMakeLists.txt11
-rw-r--r--hl/examples/CMakeLists.txt11
-rw-r--r--hl/fortran/examples/CMakeLists.txt17
-rw-r--r--hl/fortran/test/CMakeLists.txt51
-rw-r--r--hl/test/CMakeLists.txt22
-rw-r--r--hl/tools/CMakeLists.txt31
7 files changed, 13 insertions, 152 deletions
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 0205309..23b0db3 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -13,16 +13,7 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
IF (HDF5_BUILD_EXAMPLES)
ADD_EXECUTABLE (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
H5_NAMING (ptExampleFL)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (ptExampleFL
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (ptExampleFL)
TARGET_LINK_LIBRARIES (
ptExampleFL
${HDF5_HL_CPP_LIB_TARGET}
@@ -34,16 +25,7 @@ IF (HDF5_BUILD_EXAMPLES)
ADD_EXECUTABLE (ptExampleVL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleVL.cpp)
H5_NAMING (ptExampleVL)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (ptExampleVL
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (ptExampleVL)
TARGET_LINK_LIBRARIES (
ptExampleVL
${HDF5_HL_CPP_LIB_TARGET}
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index afcb8fe..cf621a2 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -18,16 +18,7 @@ IF (BUILD_TESTING)
ADD_EXECUTABLE (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
H5_NAMING (hl_ptableTest)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_ptableTest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_ptableTest)
TARGET_LINK_LIBRARIES (
hl_ptableTest
${HDF5_LIB_TARGET}
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 0d29b7f..227f066 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -30,16 +30,7 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
H5_NAMING (hl_ex_${example})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_ex_${example}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_ex_${example})
TARGET_LINK_LIBRARIES (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
ENDFOREACH (example ${examples})
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index 3ba6969..5e20da3 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -19,22 +19,7 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
H5_NAMING (hl_f90_ex_${example})
- IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_ex_${example}
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_ex_${example}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_ex_${example})
TARGET_LINK_LIBRARIES (hl_f90_ex_${example}
${HDF5_HL_F90_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index f505dbd..b4f4075 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -15,22 +15,7 @@ LINK_DIRECTORIES (
#-- Adding test for hl_f90_tstlite
ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90)
H5_NAMING (hl_f90_tstlite)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tstlite
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tstlite
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tstlite)
TARGET_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
@@ -39,22 +24,7 @@ ADD_TEST (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
#-- Adding test for hl_f90_tstimage
ADD_EXECUTABLE (hl_f90_tstimage tstimage.f90)
H5_NAMING (hl_f90_tstimage)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tstimage
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tstimage
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tstimage)
TARGET_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
@@ -63,22 +33,7 @@ ADD_TEST (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
#-- Adding test for hl_f90_tsttable
ADD_EXECUTABLE (hl_f90_tsttable tsttable.f90)
H5_NAMING (hl_f90_tsttable)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tsttable
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tsttable
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tsttable)
TARGET_LINK_LIBRARIES (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index d016aed..182fd14 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -23,16 +23,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
MACRO (HL_ADD_TEST hl_name files)
ADD_EXECUTABLE (hl_${hl_name} ${hl_name}.c)
H5_NAMING (hl_${hl_name})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_${hl_name}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_${hl_name})
TARGET_LINK_LIBRARIES (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -70,16 +61,7 @@ HL_ADD_TEST (test_table "test_table_be.hdf5;test_table_cray.hdf5;test_table_le.h
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (hl_gen_test_ds gen_test_ds.c)
H5_NAMING (hl_gen_test_ds)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_gen_test_ds
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_gen_test_ds)
TARGET_LINK_LIBRARIES (hl_gen_test_ds
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 62a0ea5..388b1da 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -19,16 +19,7 @@ INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5)
ADD_EXECUTABLE (gif2h5 ${GIF2H5_SRCS})
H5_NAMING (gif2h5)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (gif2h5
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (gif2h5)
TARGET_LINK_LIBRARIES (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#-- Add h52gif program
@@ -38,16 +29,7 @@ SET (hdf2gif_SRCS
)
ADD_EXECUTABLE (hdf2gif ${hdf2gif_SRCS})
H5_NAMING (hdf2gif)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hdf2gif
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (hdf2gif)
TARGET_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
# --------------------------------------------------------------------
@@ -58,14 +40,7 @@ TARGET_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_T
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
H5_NAMING (hl_h52gifgentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (hl_h52gifgentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_h52gifgentest)
TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)