Replies: 1 comment
-
Actually it should need I found that To add it to the triplet-wide compile flags, you would string-append to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have an application which uses an external lib dependency which uses c++ threads (for example spdlog). If i target my desktop all is ok. If i target emscripten it does not work because the dependency spdlog is compiled without thread support via the wasm32-emscripten triplet and the VCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/pro/emsdk/upstream/emscripten/cmake/Modules/Platform/emscripten.cmake toolchain.
To activate the thread support in emscripten you need to pass the "-s NO_DISABLE_EXCEPTION_CATCHING -s ALLOW_MEMORY_GROWTH -s TOTAL_STACK=8388608" flags to the compilation chain but this is not made when vcpkd compile its dependencies. I don't want to create a specific port file for all the external lib I use to include this emscripten pthread support.
Is there a way to tell vcpkg to add specific options when it compiles an external lib. I try to put them in another priplet or in the emscripten.cmake toolchain without success
In short when i compile my app, i use the following command:
{
"directory": "C:/bld/bofstd-web",
"command": "C:\pro\emsdk\upstream\emscripten\em++.bat -DCRT_NONSTDC_NO_DEPRECATE -DCRT_SECURE_NO_WARNINGS -DIXML_STATIC_LIB -DONLY_C_LOCALE=0 -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DUSE_OS_TZDB=1 -DWINSOCK_DEPRECATED_NO_WARNINGS -Dbofstd_EXPORTS=1 -IC:/pro/github/bofstd/lib/include -IC:/pro/github/bofstd/lib/third/cpp-linenoise-master -IC:/pro/github/bofstd/lib/third/AsyncMulticastDelegate/include -IC:/pro/github/bofstd/lib/third/ixml/inc -IC:/pro/github/bofstd/lib/third/ixml/src/inc -IC:/bld/bofstd-web/lib -IC:/pro/emsdk/upstream/emscripten/cache/sysroot -isystem C:/bld/bofstd-web/vcpkg_installed/wasm32-emscripten/include -pthread -s NO_DISABLE_EXCEPTION_CATCHING -s ALLOW_MEMORY_GROWTH -s TOTAL_STACK=8388608 -g -std=c++17 -fvisibility=hidden -o lib\CMakeFiles\bofstd.dir\src\bofstd.cpp.o -c C:\pro\github\bofstd\lib\src\bofstd.cpp",
"file": "C:\pro\github\bofstd\lib\src\bofstd.cpp",
"output": "lib\CMakeFiles\bofstd.dir\src\bofstd.cpp.o"
}
but when vcpkg compile its dependency it uses c++ flags which comes from its port file...
Thank you for your help and time
Beta Was this translation helpful? Give feedback.
All reactions