diff --git a/packages/seacas/libraries/aprepro_lib/CMakeLists.txt b/packages/seacas/libraries/aprepro_lib/CMakeLists.txt index c9a52f2cad..5d7a208104 100644 --- a/packages/seacas/libraries/aprepro_lib/CMakeLists.txt +++ b/packages/seacas/libraries/aprepro_lib/CMakeLists.txt @@ -172,7 +172,7 @@ TRIBITS_ADD_ADVANCED_TEST( OUTPUT_FILE test-strings.output NOEXEPREFIX NOEXESUFFIX PASS_ANY - TEST_1 CMND grep ARGS -v Aprepro: test-strings.output OUTPUT_FILE grepped-strings.out + TEST_1 CMND grep ARGS -v ^Aprepro test-strings.output OUTPUT_FILE grepped-strings.out TEST_2 CMND diff ARGS -w ${CMAKE_CURRENT_SOURCE_DIR}/test_standard.out ${CMAKE_CURRENT_BINARY_DIR}/grepped-strings.out diff --git a/packages/seacas/libraries/aprepro_lib/apr_aprepro.cc b/packages/seacas/libraries/aprepro_lib/apr_aprepro.cc index 98fa1293dd..255159ff80 100644 --- a/packages/seacas/libraries/aprepro_lib/apr_aprepro.cc +++ b/packages/seacas/libraries/aprepro_lib/apr_aprepro.cc @@ -34,7 +34,9 @@ #endif namespace { - const std::string version_string{"6.21 (2023/09/25)"}; + const std::string version_short{"6.22"}; + const std::string version_date{"(2023/09/28)"}; + const std::string version_string = version_short + " " + version_date; void output_copyright(); @@ -131,7 +133,8 @@ namespace SEAMS { cleanup_memory(); } - std::string Aprepro::version() { return version_string; } + const std::string &Aprepro::version() { return version_string; } + const std::string &Aprepro::short_version() { return version_short; } std::string Aprepro::long_version() const { @@ -226,7 +229,7 @@ namespace SEAMS { if (colorize) { (*errorStream) << trmclr::red; } - (*errorStream) << "Aprepro: ERROR: "; + (*errorStream) << "Aprepro-" << short_version() << ": ERROR: "; } ss << msg; diff --git a/packages/seacas/libraries/aprepro_lib/aprepro.h b/packages/seacas/libraries/aprepro_lib/aprepro.h index d04db91126..feea00f7ae 100644 --- a/packages/seacas/libraries/aprepro_lib/aprepro.h +++ b/packages/seacas/libraries/aprepro_lib/aprepro.h @@ -115,10 +115,13 @@ namespace SEAMS { const std::ostringstream &parsing_results() const { return parsingResults; } void clear_results(); + /** Return string representation of current version of aprepro + commit date. */ + static const std::string &version(); + /** Return string representation of current version of aprepro. */ - static std::string version(); + static const std::string &short_version(); - /** Return long version: `# Algebraic Preprocessor (Aprepro) version X.X.X` */ + /** Return long version: `# Algebraic Preprocessor (Aprepro) version X.X (date)` */ std::string long_version() const; /** Invoke the scanner and parser for a stream.