Skip to content

Commit c3886d3

Browse files
Automatized the version printing
1 parent 3b49bbd commit c3886d3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ set(CMAKE_CXX_STANDARD 17)
99
set(CMAKE_CXX_STANDARD_REQUIRED True)
1010
add_compile_definitions("MOORDYN_MAJOR_VERSION=${MOORDYN_MAJOR_VERSION}")
1111
add_compile_definitions("MOORDYN_MINOR_VERSION=${MOORDYN_MINOR_VERSION}")
12+
add_compile_definitions("MOORDYN_PATCH_VERSION=${MOORDYN_PATCH_VERSION}")
1213
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME Runtime)
1314

1415
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

source/MoorDyn2.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ moordyn::MoorDyn::MoorDyn(const char* infilename, int log_level)
108108
_basepath = _filepath.substr(0, lastSlash + 1);
109109
}
110110

111-
LOGMSG << "\n Running MoorDyn (v2.3.1, 2024-5-24)" << endl // TODO: can we automate this?
111+
LOGMSG << "\n Running MoorDyn (v"
112+
<< MOORDYN_MAJOR_VERSION << "." << MOORDYN_MINOR_VERSION << "."
113+
<< MOORDYN_PATCH_VERSION << ")" << endl
112114
<< " MoorDyn v2 has significant ongoing input file changes "
113115
"from v1."
114116
<< endl

0 commit comments

Comments
 (0)