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
{{ message }}
This repository was archived by the owner on Feb 17, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 17, 2023. It is now read-only.
target_include_directories use -i instead of -isystem #30
So this is a repeat of #4 but I will make sure to follow up.
So currently when I build I get a bunch of warnings from include/v8.h (which obscures warnings that are actually my fault) I am using set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
I've been thinking about this for a while, because I'm not sure exactly how I want to handle it. At a minimum, here are my current thoughts:
The re-written release of node-cmake assumes that NodeJS.cmake gets copied to the root of your project (peer to CMakeLists.txt) at some point (I recommend initially and then every time node-cmake is updated). I provide the command ncmake update to make this easier / automatable if desired. However, unless you configure otherwise, this is a one time copy. You can always edit NodeJS.cmake for your specific project if you need specific configurations. However, its then your burden to handle conflict resolution if you want to update to the newest release of node-cmake. Generally speaking, this is how I have people test changes to the code, and I try to incorporate as many as possible so that the burden is minimized.
As before, I sort of feel like you're trying to have your cake and eat it too. You've turned on -Wall -pedantic -Wextra, and are complaining that, as you've requested, its throwing lots and lots of warnings to the console. Since this is only an issue when you have this extreme of a warning flag enabled, and it won't affect most users, I'm hesitant to change things. (Also, for what its worth, manually modifying ${CMAKE_CXX_FLAGS} is awfully non-portable. Have you looked for a way to add the warning flags without the call to set()? Maybe compile features? At least guarded by os, e.g. if(NOT WIN32)...?).
Compounding this, my concern would be that adding SYSTEM could unknowingly mask an error deep in the node/v8 sources. If I understand what SYSTEM would change, if I messed up a templated V8 function, or a call to the node defintions, etc, the warning / error would be omitted since technically the origin of the code that caused the problem is within a path guarded by SYSTEM. I don't like the idea of having side effects like this where an end user without your specific use case could get bitten by not knowing some subtle warning was squashed by this flag.
All this said, I'm more than willing to add SYSTEM permanently to the NodeJS.cmake file. I just want to make sure I can adequately address these concerns in a portable, general way for my users.
In other words, please prove me wrong. In the mean time, a manual patch of NodeJS.cmake ought to handle your issue.
Activity
cjntaylor commentedon Sep 16, 2017
I've been thinking about this for a while, because I'm not sure exactly how I want to handle it. At a minimum, here are my current thoughts:
node-cmakeassumes thatNodeJS.cmakegets copied to the root of your project (peer toCMakeLists.txt) at some point (I recommend initially and then every timenode-cmakeis updated). I provide the commandncmake updateto make this easier / automatable if desired. However, unless you configure otherwise, this is a one time copy. You can always editNodeJS.cmakefor your specific project if you need specific configurations. However, its then your burden to handle conflict resolution if you want to update to the newest release ofnode-cmake. Generally speaking, this is how I have people test changes to the code, and I try to incorporate as many as possible so that the burden is minimized.-Wall -pedantic -Wextra, and are complaining that, as you've requested, its throwing lots and lots of warnings to the console. Since this is only an issue when you have this extreme of a warning flag enabled, and it won't affect most users, I'm hesitant to change things. (Also, for what its worth, manually modifying${CMAKE_CXX_FLAGS}is awfully non-portable. Have you looked for a way to add the warning flags without the call toset()? Maybe compile features? At least guarded by os, e.g.if(NOT WIN32)...?).SYSTEMcould unknowingly mask an error deep in the node/v8 sources. If I understand whatSYSTEMwould change, if I messed up a templated V8 function, or a call to the node defintions, etc, the warning / error would be omitted since technically the origin of the code that caused the problem is within a path guarded bySYSTEM. I don't like the idea of having side effects like this where an end user without your specific use case could get bitten by not knowing some subtle warning was squashed by this flag.All this said, I'm more than willing to add
SYSTEMpermanently to theNodeJS.cmakefile. I just want to make sure I can adequately address these concerns in a portable, general way for my users.In other words, please prove me wrong. In the mean time, a manual patch of
NodeJS.cmakeought to handle your issue.Sean-Der commentedon Jan 15, 2018
I am going to close this, I solved this locally. If anyone is still hitting this issue you can do this after your call to
add_nodejs_module