mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
CMake: MINGW implies WIN32
This commit is contained in:
parent
6c0f954d68
commit
0db1fe81d5
@ -189,7 +189,7 @@ HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN)
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the COPYING.txt file for the windows binary package
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file (${HDF5_SOURCE_DIR}/COPYING ${HDF5_BINARY_DIR}/COPYING.txt @ONLY)
|
||||
endif ()
|
||||
|
||||
@ -208,7 +208,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
${HDF5_SOURCE_DIR}/release_docs/COPYING
|
||||
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
|
||||
)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (release_files
|
||||
${release_files}
|
||||
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
|
||||
@ -222,7 +222,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
|
||||
${HDF5_SOURCE_DIR}/release_docs/INSTALL
|
||||
)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (release_files
|
||||
${release_files}
|
||||
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
|
||||
@ -290,7 +290,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
|
||||
|
||||
set (CPACK_GENERATOR "TGZ")
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CPACK_GENERATOR "ZIP")
|
||||
|
||||
if (NSIS_EXECUTABLE)
|
||||
@ -455,7 +455,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
|
||||
if (HDF5_PACKAGE_EXTLIBS)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
|
||||
else ()
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
|
||||
@ -464,7 +464,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
|
||||
endif ()
|
||||
endif ()
|
||||
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
|
||||
else ()
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
|
||||
@ -473,7 +473,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
|
||||
endif ()
|
||||
endif ()
|
||||
if (PLUGIN_FOUND AND PLUGIN_USE_EXTERNAL)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${PLUGIN_BINARY_DIR};PLUGIN;ALL;/")
|
||||
else ()
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${PLUGIN_BINARY_DIR};PLUGIN;libraries;/")
|
||||
|
@ -572,10 +572,11 @@ endif ()
|
||||
# Certain systems may add /Debug or /Release to output paths
|
||||
# and we need to call the executable from inside the CMake configuration
|
||||
#-----------------------------------------------------------------------------
|
||||
set (EXE_EXT "")
|
||||
if (WIN32 OR MINGW)
|
||||
set (EXE_EXT ".exe")
|
||||
add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CRT_SECURE_NO_WARNINGS _CONSOLE)
|
||||
if (WIN32)
|
||||
add_compile_definitions (_CRT_SECURE_NO_WARNINGS)
|
||||
if (MSVC)
|
||||
add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CONSOLE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (MSVC)
|
||||
@ -777,7 +778,7 @@ endif ()
|
||||
option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
|
||||
if (HDF5_ENABLE_THREADSAFE)
|
||||
# check for unsupported options
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
message (STATUS " **** thread-safety option not supported with static library **** ")
|
||||
message (STATUS " **** thread-safety option will not be used building static library **** ")
|
||||
endif ()
|
||||
|
@ -49,7 +49,7 @@ endif ()
|
||||
|
||||
message (STATUS "COMMAND: ${TEST_TESTER} -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=${LOG_LEVEL} -Djava.library.path=\"${TEST_LIBRARY_DIRECTORY}\" -cp \"${TEST_CLASSPATH}\" ${TEST_ARGS} ${TEST_PROGRAM} ${ARGN}")
|
||||
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (ENV{PATH} "$ENV{PATH}\\;${TEST_LIBRARY_DIRECTORY}")
|
||||
else ()
|
||||
set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
|
||||
@ -131,7 +131,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
|
||||
file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
|
||||
@ -202,7 +202,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
|
||||
file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
|
||||
|
@ -54,7 +54,7 @@ message (STATUS "USING ${TEST_VOL} ON COMMAND: ${TEST_TESTER} -Xmx1024M -Dorg.sl
|
||||
|
||||
set (ENV{HDF5_VOL_CONNECTOR} "${TEST_VOL}")
|
||||
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (ENV{PATH} "$ENV{PATH}\\;${TEST_LIBRARY_DIRECTORY}")
|
||||
else ()
|
||||
set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
|
||||
@ -136,7 +136,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
|
||||
list(LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
|
||||
file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
|
||||
@ -207,7 +207,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
|
||||
list(LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
|
||||
file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
|
||||
|
@ -46,7 +46,7 @@ endif ()
|
||||
message (STATUS "COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}")
|
||||
|
||||
if (TEST_LIBRARY_DIRECTORY)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}")
|
||||
else ()
|
||||
set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
|
||||
@ -105,7 +105,7 @@ if (TEST_ERRREF)
|
||||
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
|
||||
file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
|
||||
|
@ -38,7 +38,7 @@ endif ()
|
||||
message (STATUS "COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}")
|
||||
|
||||
if (TEST_LIBRARY_DIRECTORY)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}")
|
||||
else ()
|
||||
set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
|
||||
@ -212,7 +212,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
|
||||
file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
|
||||
@ -283,7 +283,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
|
||||
file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
|
||||
|
@ -39,7 +39,7 @@ set (HDF_JAVA_SZIP_EXAMPLES
|
||||
set (${HDF_JAVA_EXAMPLES} ${HDF_JAVA_EXAMPLES} ${HDF_JAVA_SZIP_EXAMPLES})
|
||||
endif (H5_HAVE_FILTER_SZIP)
|
||||
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
|
||||
else ()
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
|
||||
|
@ -24,7 +24,7 @@ set (HDF_JAVA_EXAMPLES
|
||||
H5Ex_T_VLString
|
||||
)
|
||||
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
|
||||
else ()
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
|
||||
|
@ -13,7 +13,7 @@ set (HDF_JAVA_EXAMPLES
|
||||
H5Ex_G_Visit
|
||||
)
|
||||
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
|
||||
else ()
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
|
||||
|
@ -13,7 +13,7 @@ set (HDF_JAVA_EXAMPLES
|
||||
H5_ReadWrite
|
||||
)
|
||||
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
|
||||
else ()
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
|
||||
|
@ -96,7 +96,7 @@ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_
|
||||
|
||||
add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_files_list})
|
||||
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
|
||||
else ()
|
||||
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
|
||||
|
@ -844,7 +844,7 @@ endif ()
|
||||
### F I L T E R P L U G I N T E S T S
|
||||
##############################################################################
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CMAKE_SEP "\;")
|
||||
set (BIN_REL_PATH "../../")
|
||||
else ()
|
||||
@ -940,7 +940,7 @@ endif ()
|
||||
### V O L P L U G I N T E S T S
|
||||
##############################################################################
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (CMAKE_SEP "\;")
|
||||
set (BIN_REL_PATH "../../")
|
||||
else ()
|
||||
|
@ -41,7 +41,7 @@ endif ()
|
||||
message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
|
||||
|
||||
if (TEST_LIBRARY_DIRECTORY)
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}")
|
||||
else ()
|
||||
set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
|
||||
|
@ -405,7 +405,7 @@
|
||||
# --------------------------------------------------------------------
|
||||
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbin1.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl" "h5dump_std_files")
|
||||
|
||||
if (WIN32 OR MINGW)
|
||||
if (WIN32)
|
||||
configure_file(${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp NEWLINE_STYLE CRLF)
|
||||
#file (READ ${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp TEST_STREAM)
|
||||
#file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user