Help changing build tool
I am using CLion v2022.3 and I need help changing the "build tool" in some projects. I'd like to build my project using node-gyp witch is a compiler/build tool designed to build NodeJS C++ addons. How can I configure my Project so that it does that. My current configuration is
cmake_minimum_required(VERSION 3.17)
project(X)
set(CMAKE_CXX_STANDARD 23)
add_library(X SHARED fake.cpp)
add_custom_target(build_addon
COMMAND node-gyp build
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Building Node.js addon"
)
add_dependencies(X build_addon)
include_directories(
C:/MinGW/x86_64-w64-mingw32/include
)
There is just one problem sometimes node-gyp throws a debugging information corrupt error - The old files don't work anymore even though they are not corrupt. I need help making it run `node-gyp rebuild ` instead of `node-gyp build` if it sees that error. Also consider this as a feature suggestion. I would like to have custom tool-chains that I can configure the "build command" to. Instead of always throwing an error `This tool can't build a simple test project`
请先登录再写评论。
Hello!
Maybe custom build targets will be helpful for your scenario - https://www.jetbrains.com/help/clion/custom-build-targets.html