mirror of
https://github.com/JHUAPL/kami.git
synced 2026-01-09 19:47:58 -05:00
Redo versioning with neargye-semver
This commit is contained in:
@@ -47,3 +47,4 @@ class KamiConan(ConanFile):
|
||||
self.requires("fmt/7.1.3")
|
||||
self.requires("spdlog/1.8.5")
|
||||
self.requires("cli11/1.9.1")
|
||||
self.requires("neargye-semver/0.3.0")
|
||||
|
||||
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
console = spdlog::stdout_color_st(ident);
|
||||
console->set_level(spdlog::level::from_str(log_level_option));
|
||||
console->info("Compiled with Kami/{}, log level {}", KAMI_VERSION_STRING, log_level_option);
|
||||
console->info("Compiled with Kami/{}, log level {}", kami::version.to_string(), log_level_option);
|
||||
console->info("Starting Boltzmann Wealth Model with {} agents on a {}-unit grid for {} steps",agent_count, x_size, max_steps);
|
||||
|
||||
rng = make_shared<mt19937>(initial_seed);
|
||||
|
||||
@@ -167,7 +167,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
console = spdlog::stdout_color_st(ident);
|
||||
console->set_level(spdlog::level::from_str(log_level_option));
|
||||
console->info("Compiled with Kami/{}, log level {}", KAMI_VERSION_STRING, log_level_option);
|
||||
console->info("Compiled with Kami/{}, log level {}", kami::version.to_string(), log_level_option);
|
||||
console->info("Starting Boltzmann Wealth Model with {} agents on a {}x{}-unit grid for {} steps", agent_count, x_size, y_size, max_steps);
|
||||
|
||||
BoltzmannWealthModel2D model(agent_count, x_size, y_size, initial_seed);
|
||||
|
||||
@@ -36,29 +36,28 @@
|
||||
#ifndef KAMI_CONFIG_H
|
||||
#define KAMI_CONFIG_H
|
||||
|
||||
#include <semver.hpp>
|
||||
|
||||
/**
|
||||
* The major version of the Kami library.
|
||||
*/
|
||||
#define KAMI_VERSION_MAJOR @KAMI_VERSION_MAJOR @
|
||||
#define KAMI_VERSION_MAJOR @KAMI_VERSION_MAJOR@
|
||||
|
||||
/**
|
||||
* The minor version of the Kami library.
|
||||
*/
|
||||
#define KAMI_VERSION_MINOR @KAMI_VERSION_MINOR @
|
||||
#define KAMI_VERSION_MINOR @KAMI_VERSION_MINOR@
|
||||
|
||||
/**
|
||||
* The patch level of the Kami library.
|
||||
*/
|
||||
#define KAMI_VERSION_PATCH @KAMI_VERSION_PATCH @
|
||||
#define KAMI_VERSION_PATCH @KAMI_VERSION_PATCH@
|
||||
|
||||
/**
|
||||
* The version of the Kami library as a `char*` constant.
|
||||
*/
|
||||
#define KAMI_VERSION_STRING "@KAMI_VERSION_STRING@"
|
||||
namespace kami {
|
||||
|
||||
constexpr semver::version version{KAMI_VERSION_MAJOR, KAMI_VERSION_MINOR, KAMI_VERSION_PATCH};
|
||||
|
||||
} // namespace kami
|
||||
|
||||
/**
|
||||
* The Kami library identifier as a `char *` constant.
|
||||
*/
|
||||
#define KAMI_VERSION_ID "Kami/@KAMI_VERSION_STRING@"
|
||||
|
||||
#endif // KAMI_CONFIG_H
|
||||
|
||||
@@ -52,7 +52,7 @@ int main(int argc, char **argv) {
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
console->set_level(spdlog::level::from_str(logLevelOption));
|
||||
console->info("Compiled with Kami/{}, log level {}", KAMI_VERSION_STRING, logLevelOption);
|
||||
console->info("Compiled with Kami/{}, log level {}", kami::version.to_string(), logLevelOption);
|
||||
|
||||
TestAgent test_agent;
|
||||
console->debug("Successfully created Agent with ID {}", test_agent.get_agent_id().to_string());
|
||||
|
||||
@@ -48,7 +48,7 @@ int main(int argc, char **argv) {
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
console->set_level(spdlog::level::from_str(logLevelOption));
|
||||
console->info("Compiled with Kami/{}, log level {}", KAMI_VERSION_STRING, logLevelOption);
|
||||
console->info("Compiled with Kami/{}, log level {}", kami::version.to_string(), logLevelOption);
|
||||
|
||||
AgentID testAgentID;
|
||||
console->debug("Successfully created AgentID with ID {}", testAgentID.to_string());
|
||||
|
||||
Reference in New Issue
Block a user