-
Notifications
You must be signed in to change notification settings - Fork 141
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 CK_TIME_KERNEL as toggleable CMake Variable #1794
Conversation
I don't think this is a good idea. |
CMakeLists.txt
Outdated
@@ -102,6 +102,11 @@ if(CK_USE_CODEGEN) | |||
add_definitions(-DCK_USE_CODEGEN) | |||
endif() | |||
|
|||
option(CK_TIME_KERNEL "Enable kernel time tracking" OFF) | |||
if(CK_TIME_KERNEL) | |||
add_definitions(-DCK_TIME_KERNEL) |
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.
Uers are not able to define CK_TIME_KERNEL=1 through setting the CMake option.
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.
Do you mean "not intended to be allowed", or "not able to with my changes"? I was able to compile and modify the directive with this change. If the user should not be able to modify this, please clarify. I have added a new commit to persist the default as ON while still allowing users to disable it if they please.
d5b3da7
to
e031134
Compare
Allow CK_TIME_KERNEL to be toggled through CMake variable during build, maintaining default enablement
Example:
cmake <...> -D CK_TIME_KERNEL=OFF ..