This repository was archived by the owner on Mar 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Add *NRN_VERSION_* macros and variables. #796
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| /* | ||
| # ============================================================================= | ||
| # Copyright (c) 2022 Blue Brain Project/EPFL | ||
| # | ||
| # See top-level LICENSE file for details. | ||
| # ============================================================================= | ||
| */ | ||
| #pragma once | ||
|
|
||
| // This is the CoreNEURON analogue of nrnsemanticversion.h in NEURON. Hopefully | ||
| // the duplication can go away soon. | ||
| #define NRN_VERSION_MAJOR @NRN_VERSION_MAJOR@ | ||
| #define NRN_VERSION_MINOR @NRN_VERSION_MINOR@ | ||
| #define NRN_VERSION_PATCH @NRN_VERSION_PATCH@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| # ============================================================================= | ||
| # Copyright (c) 2022 Blue Brain Project/EPFL | ||
| # | ||
| # See top-level LICENSE file for details. | ||
| # ============================================================================= | ||
| */ | ||
| #pragma once | ||
|
|
||
| // This is the CoreNEURON analogue of nrnversionmacros.h in NEURON. Hopefully | ||
| // the duplication can go away soon. | ||
| #include "coreneuron/config/neuron_version.hpp" | ||
| #define NRN_VERSION_INT(maj, min, pat) (10000 * maj + 100 * min + pat) | ||
| #define NRN_VERSION NRN_VERSION_INT(NRN_VERSION_MAJOR, NRN_VERSION_MINOR, NRN_VERSION_PATCH) | ||
| #define NRN_VERSION_EQ(maj, min, pat) (NRN_VERSION == NRN_VERSION_INT(maj, min, pat)) | ||
| #define NRN_VERSION_NE(maj, min, pat) (NRN_VERSION != NRN_VERSION_INT(maj, min, pat)) | ||
| #define NRN_VERSION_GT(maj, min, pat) (NRN_VERSION > NRN_VERSION_INT(maj, min, pat)) | ||
| #define NRN_VERSION_LT(maj, min, pat) (NRN_VERSION < NRN_VERSION_INT(maj, min, pat)) | ||
| #define NRN_VERSION_GTEQ(maj, min, pat) (NRN_VERSION >= NRN_VERSION_INT(maj, min, pat)) | ||
| #define NRN_VERSION_LTEQ(maj, min, pat) (NRN_VERSION <= NRN_VERSION_INT(maj, min, pat)) | ||
|
|
||
| // 8.2.0 is significant because all versions >=8.2.0 should contain definitions | ||
| // of these macros, and doing #ifndef NRN_VERSION_GTEQ_8_2_0 is a more | ||
| // descriptive way of writing #if defined(NRN_VERSION_GTEQ). Testing for 8.2.0 | ||
| // is likely to be a common pattern when adapting MOD file VERBATIM blocks for | ||
| // C++ compatibility. | ||
| #if NRN_VERSION_GTEQ(8, 2, 0) | ||
| #define NRN_VERSION_GTEQ_8_2_0 | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.