-
Notifications
You must be signed in to change notification settings - Fork 50
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
Issue warnings for non-Release builds #701
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <iostream> | ||
|
||
#if !defined(TRACCC_BUILD_TYPE_IS_RELEASE) || !defined(NDEBUG) || \ | ||
defined(_DEBUG) | ||
#define TRACCC_OPTIMIZATION_WARNING() \ | ||
do { \ | ||
std::cout \ | ||
<< "WARNING: traccc was built without Release mode, without the " \ | ||
"`NDEBUG` flag, or (on MSVC) with the `_DEBUG` flag. " \ | ||
"Performance is guaranteed to be much lower and compute " \ | ||
"performance results should be considered unreliable!" \ | ||
<< std::endl; \ | ||
} while (false) | ||
#else | ||
#define TRACCC_OPTIMIZATION_WARNING() \ | ||
do { \ | ||
} while (false) | ||
#endif | ||
Comment on lines
+12
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Coming back to this... Why a macro at this point? A There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I have no idea what the GitHub UI is doing now... 😕 |
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.