diff --git a/libsrc/core/CMakeLists.txt b/libsrc/core/CMakeLists.txt index da84a9d6..b763246a 100644 --- a/libsrc/core/CMakeLists.txt +++ b/libsrc/core/CMakeLists.txt @@ -18,10 +18,7 @@ string(REPLACE "|" ";" ng_compile_flags_replace_sep "${NG_COMPILE_FLAGS}") target_compile_options(ngcore PUBLIC ${ng_compile_flags_replace_sep}) if(EMSCRIPTEN) - target_link_options(ngcore PUBLIC -sALLOW_MEMORY_GROWTH) - # target_link_options(ngcore PUBLIC -sINITIAL_MEMORY=1gb) - target_link_options(ngcore PUBLIC -pthread -sPTHREAD_POOL_SIZE=16) - target_compile_options(ngcore PUBLIC -pthread) + target_link_options(nglib PUBLIC -sALLOW_MEMORY_GROWTH -sENVIRONMENT=web) endif() if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) diff --git a/libsrc/core/taskmanager.cpp b/libsrc/core/taskmanager.cpp index 247700ea..15d9144e 100644 --- a/libsrc/core/taskmanager.cpp +++ b/libsrc/core/taskmanager.cpp @@ -76,14 +76,14 @@ namespace ngcore numa_run_on_node (0); #endif -#ifndef WIN32 +#if !defined(WIN32) && !defined(EMSCRIPTEN) // master has maximal priority ! int policy; struct sched_param param; pthread_getschedparam(pthread_self(), &policy, ¶m); param.sched_priority = sched_get_priority_max(policy); pthread_setschedparam(pthread_self(), policy, ¶m); -#endif // WIN32 +#endif // !defined(WIN32) && !defined(EMSCRIPTEN) task_manager->StartWorkers(); diff --git a/nglib/CMakeLists.txt b/nglib/CMakeLists.txt index 388d522d..370b670b 100644 --- a/nglib/CMakeLists.txt +++ b/nglib/CMakeLists.txt @@ -9,11 +9,5 @@ target_link_libraries(nglib PUBLIC ngcore) target_link_libraries( nglib PRIVATE ${MPI_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} netgen_cgns ) -if(EMSCRIPTEN) - target_link_options(nglib PUBLIC -sALLOW_MEMORY_GROWTH) - target_link_options(nglib PUBLIC -pthread -sPTHREAD_POOL_SIZE=16) - target_compile_options(nglib PUBLIC -pthread) -endif(EMSCRIPTEN) - install(TARGETS nglib netgen_cgns ${NG_INSTALL_DIR}) install(FILES nglib.h DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel)