You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I had to update to the current cmake-js version.
Unfortunately, the following code stopped working, which worked before:
if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)
# Generate node.lib
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
endif()
I am using the clang-cl toolchain and it turns out that CMAKE_AR now points to lib of llvm, which does support the /def: input. As it turns out link of llvm instead supports the /def: input, so replacing CMAKE_AR with CMAKE_LINKER does the trick:
if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)
# Generate node.lib
execute_process(COMMAND ${CMAKE_LINKER} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
endif()
I know that is not really an problem/issue, but since I spend half a day, chaising this, I thought documenting it, may save someone's day.
The text was updated successfully, but these errors were encountered:
First, thank you for the cmake-js build system.
Recently, I had to update to the current cmake-js version.
Unfortunately, the following code stopped working, which worked before:
I am using the clang-cl toolchain and it turns out that
CMAKE_AR
now points to lib of llvm, which does support the/def:
input. As it turns out link of llvm instead supports the/def:
input, so replacingCMAKE_AR
withCMAKE_LINKER
does the trick:I know that is not really an problem/issue, but since I spend half a day, chaising this, I thought documenting it, may save someone's day.
The text was updated successfully, but these errors were encountered: