diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-01-30 22:03:03 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-01-30 22:03:03 (GMT) |
commit | 435fd5afa57eb8c3157600431f0c8d4df6257cd4 (patch) | |
tree | 52c2016563e20ecacabf7cad45a2226306ec0365 | |
parent | 1711c3727e11d41268da1c6d4ae0204e081c5e1d (diff) | |
download | hdf5-435fd5afa57eb8c3157600431f0c8d4df6257cd4.zip hdf5-435fd5afa57eb8c3157600431f0c8d4df6257cd4.tar.gz hdf5-435fd5afa57eb8c3157600431f0c8d4df6257cd4.tar.bz2 |
HDFFV-10398 add support for Emscriptem build system
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/CMakeLists.txt | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ee5fc2a..00ec70a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -528,9 +528,13 @@ endif () #----------------------------------------------------------------------------- # Option to embed library info into executables #----------------------------------------------------------------------------- -option (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON) -if (HDF5_ENABLE_EMBEDDED_LIBINFO) - set (H5_HAVE_EMBEDDED_LIBINFO 1) +if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set (H5_HAVE_EMBEDDED_LIBINFO 0) +else () + option (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON) + if (HDF5_ENABLE_EMBEDDED_LIBINFO) + set (H5_HAVE_EMBEDDED_LIBINFO 1) + endif () endif () include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0cc68ac..aaedfda 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -852,6 +852,9 @@ TARGET_C_PROPERTIES (H5detect STATIC " " " ") if (MSVC OR MINGW) target_link_libraries (H5detect "ws2_32.lib") endif () +if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set_property(TARGET H5detect PROPERTY LINK_FLAGS "-O0") +endif () add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c @@ -865,6 +868,9 @@ TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ") if (MSVC OR MINGW) target_link_libraries (H5make_libsettings "ws2_32.lib") endif () +if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set_property(TARGET H5make_libsettings PROPERTY LINK_FLAGS "-O0") +endif () add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c |