-
Notifications
You must be signed in to change notification settings - Fork 579
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 support for Tpetra_ENABLE_DEPRECATED_CODE #3742
Changes from 2 commits
f584735
f65365f
4a5ac85
45c850a
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 |
---|---|---|
|
@@ -14,6 +14,14 @@ TRIBITS_ADD_EXPLICIT_INSTANTIATION_OPTION() | |
# template instantiation (ETI). | ||
TRIBITS_ADD_ETI_SUPPORT() | ||
|
||
# adding macro for deprecated code (templated L0 and G0, and dynamic allocation) | ||
TRIBITS_ADD_OPTION_AND_DEFINE( | ||
Tpetra_ENABLE_DEPRECATED_CODE | ||
TPETRA_ENABLE_DEPRECATED_CODE | ||
"Disable Tpetra deprecated code (templated ordinal types and dynamic graph/matrix allocation)" | ||
Tpetra_ENABLE_DEPRECATED_CODE_DEFAULT | ||
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. I think you need to dereference the default value here. Do this:
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. You're right, I did need that for the default. |
||
) | ||
|
||
ASSERT_DEFINED(${PACKAGE_NAME}_ENABLE_EXPLICIT_INSTANTIATION) | ||
# FIXME (mfh 17 Dec 2014) We really just want a macro, not a CMake option. | ||
# This is mainly just for backwards compatibility. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
#define TPETRACORE_CONFIG_H | ||
/* CMake uses this file to generate TpetraCore_config.h automatically */ | ||
|
||
/* define if user is using the deprecated codebase (templated ordinals, dynamicprofile) or not */ | ||
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. See above. "Deprecated code" is a generic thing; we should not refer to specifically deprecated features here. 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. Changed. |
||
#cmakedefine TPETRA_ENABLE_DEPRECATED_CODE | ||
|
||
/* define if new form of std::count is supported */ | ||
#cmakedefine HAVE_STD_NEW_COUNT_SYNTAX | ||
|
||
|
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 just specify a general message here. "Whether Tpetra enables deprecated code at compile time. Default is ON (deprecated code enabled)." We plan on using this macro in the future, for deprecating other things that we inevitably will want to deprecate :-) . This also imitates Kokkos, which uses its macro in a generic way, for all deprecated features.
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.
Got it. Thanks