summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-06-29 20:04:46 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-06-29 20:04:46 (GMT)
commit286b06971d15fc8a9df23144ff3ceb2c448c3520 (patch)
treebfdd81e3403074e10d6b63677737d2fa0b434532 /hl
parent5ed817f734dbc8252e2066db751c26d354af0b30 (diff)
downloadhdf5-286b06971d15fc8a9df23144ff3ceb2c448c3520.zip
hdf5-286b06971d15fc8a9df23144ff3ceb2c448c3520.tar.gz
hdf5-286b06971d15fc8a9df23144ff3ceb2c448c3520.tar.bz2
[svn-r19036] Added executable Linker Flag for MSVC static builds: /NODEFAULTLIB:MSVCRT
Added VERSION vars for inclusion into auto snapshot version update script Tested windows
Diffstat (limited to 'hl')
-rw-r--r--hl/c++/examples/CMakeLists.txt20
-rw-r--r--hl/c++/test/CMakeLists.txt10
-rw-r--r--hl/examples/CMakeLists.txt10
-rw-r--r--hl/fortran/examples/CMakeLists.txt17
-rw-r--r--hl/fortran/test/CMakeLists.txt81
-rw-r--r--hl/test/CMakeLists.txt20
-rw-r--r--hl/tools/CMakeLists.txt28
7 files changed, 147 insertions, 39 deletions
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index cbe2626..8fcb9bd 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -13,6 +13,16 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SOURCE_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_LINK_LIBRARIES (
ptExampleFL
${HDF5_HL_CPP_LIB_TARGET}
@@ -22,6 +32,16 @@ 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_LINK_LIBRARIES (
ptExampleVL
${HDF5_HL_CPP_LIB_TARGET}
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index c0a94f8..e9b09da 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -18,6 +18,16 @@ 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_LINK_LIBRARIES (
hl_ptableTest
${HDF5_LIB_TARGET}
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 934856a..0d29b7f 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -30,6 +30,16 @@ 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_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 64fd9df..bd9a695 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -19,17 +19,22 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (hl_f90_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.f90)
H5_NAMING (hl_f90_ex_${example})
- IF (BUILD_SHARED_LIBS)
- IF (WIN32)
- IF (MSVC)
+ IF (WIN32)
+ IF (MSVC)
+ IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (hl_f90_ex_${example}
PROPERTIES
COMPILE_FLAGS "/dll"
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
- ENDIF (MSVC)
- ENDIF (WIN32)
- ENDIF (BUILD_SHARED_LIBS)
+ 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_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 41cb675..14bd622 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -15,17 +15,22 @@ LINK_DIRECTORIES (
#-- Adding test for hl_f90_tstlite
ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90)
H5_NAMING (hl_f90_tstlite)
-IF (BUILD_SHARED_LIBS)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (hl_f90_tstlite
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
-ENDIF (BUILD_SHARED_LIBS)
+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_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
@@ -34,17 +39,22 @@ 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 (BUILD_SHARED_LIBS)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (hl_f90_tstimage
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
-ENDIF (BUILD_SHARED_LIBS)
+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_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
@@ -53,17 +63,22 @@ 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 (BUILD_SHARED_LIBS)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (hl_f90_tsttable
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
-ENDIF (BUILD_SHARED_LIBS)
+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_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 8397417..91d7c80 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -24,6 +24,16 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SOURCE_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_LINK_LIBRARIES (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -59,6 +69,16 @@ HL_ADD_TEST (test_table "test_table_be.hdf5;test_table_cray.hdf5;test_table_le.h
IF (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_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 b99e742..e8c729d 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -19,6 +19,16 @@ 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_LINK_LIBRARIES (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#-- Add h52gif program
@@ -28,6 +38,16 @@ 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_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
# --------------------------------------------------------------------
@@ -38,6 +58,14 @@ TARGET_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_T
IF (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_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)