Skip to content

Implement SHERPA_VERSION_CODE in config headers and add header guards

Andrii Verbytskyi requested to merge andriish/sherpa:use_code_for_version into master

Description

  • Implement SHERPA_VERSION_CODE in CXXFLAGS.H
  • Add header guards to CXXFLAGS.H

Test Plan

Example Result

As a result, CXXFLAGS.H will contain lines such as

#define SHERPA_VERSION_CODE 3000000

for version 3.0.0alpha1 or

#define SHERPA_VERSION_CODE 3000005

for version 3.0.5. So one would be able to do e.g. in Athena

#if defined(SHERPA_VERSION_CODE) 
///Sherpa 3
#if (SHERPA_VERSION_CODE >  3000005) && (SHERPA_VERSION_CODE <  3000010)
/// Version-specifi code
.....

#else
///
.....
#endif
/// Sherpa 2
....
#endif

Solves #499 (closed)

Merge request reports