-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add cmake git hooks options #3390
Conversation
@@ -1,19 +1,21 @@ | |||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (ENABLE_CREATE_GIT_HOOKS AND (EXISTS "xxx"))
# ...
endif()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix it.
has make if condition more clear. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@sherman-the-tank Yuehua uses visual studio IDE to develop nebula project locally. I think it's ok to introduce this option, it will not affect current workflow of others and is convenient for him to develop in windows system. WDYT? |
Add include what you use to let developer delete no use include files. |
cmake/IncludeWhatYouUse.cmake
Outdated
@@ -0,0 +1,11 @@ | |||
if(ENABLE_IncludeWhatYouUse) | |||
find_program(IncludeWhatYouUse include-what-you-use) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IncludeWhatYouUse_FOUND
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not to turn on iwyu when find the program automatically? i think this option is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it run very slow, Just let developer run it .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done!
Just couple styling comments
CMakeLists.txt
Outdated
@@ -26,6 +26,8 @@ project("Nebula Graph" C CXX) | |||
option(ENABLE_PACK_ONE "Whether to package into one" ON) | |||
option(ENABLE_VERBOSE_BISON "Enable Bison to report state" OFF) | |||
option(ENABLE_PACKAGE_TAR "Enable package artifacts to tar." OFF) | |||
option(ENABLE_CREATE_GIT_HOOKS "Enable create git hooks." ON) | |||
option(ENABLE_IncludeWhatYouUse "Enable Include_What_You_Use" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use all CAPITAL, like other options, following the convention
cmake/IncludeWhatYouUse.cmake
Outdated
@@ -0,0 +1,11 @@ | |||
if(ENABLE_IncludeWhatYouUse) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to place this file in cmake/nebula
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I move it to cmake/nebula
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I change it to CAPITAL
Codecov Report
@@ Coverage Diff @@
## master #3390 +/- ##
==========================================
- Coverage 85.40% 85.35% -0.06%
==========================================
Files 1289 1293 +4
Lines 119798 120044 +246
==========================================
+ Hits 102317 102461 +144
- Misses 17481 17583 +102
Continue to review full report at Codecov.
|
What type of PR is this?
What does this PR do?
add option that can toggle wether cmake generate git hooks , default ON, So that platform without sh shell can set it OFF and commit code.
Which issue(s)/PR(s) this PR relates to?
Special notes for your reviewer, ex. impact of this fix, etc:
Additional context:
Checklist:
Release notes:
Please confirm whether to reflect in release notes and how to describe: