File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -188,12 +188,17 @@ if(AMR_WIND_ENABLE_OPENFAST)
188
188
if (AMR_WIND_OPENFAST_VERSION VERSION_GREATER_EQUAL "4" AND AMR_WIND_OPENFAST_VERSION VERSION_LESS "4.1" )
189
189
message (FATAL_ERROR "AMR-Wind does not support OpenFAST version 4.0. Either update to 4.1 or revert to 3." )
190
190
endif ()
191
+ message (STATUS "AMR_WIND_OPENFAST_VERSION = ${AMR_WIND_OPENFAST_VERSION} " )
191
192
string (REPLACE "." ";" OPENFAST_VERSION_LIST ${AMR_WIND_OPENFAST_VERSION} )
192
193
list (LENGTH OPENFAST_VERSION_LIST OPENFAST_VERSION_LIST_LENGTH)
193
194
if (OPENFAST_VERSION_LIST_LENGTH GREATER_EQUAL 1)
194
195
list (GET OPENFAST_VERSION_LIST 0 OPENFAST_VERSION_MAJOR)
195
196
endif ()
197
+ if (OPENFAST_VERSION_LIST_LENGTH GREATER_EQUAL 2)
198
+ list (GET OPENFAST_VERSION_LIST 1 OPENFAST_VERSION_MINOR)
199
+ endif ()
196
200
target_compile_definitions (${amr_wind_lib_name} PUBLIC OPENFAST_VERSION_MAJOR=${OPENFAST_VERSION_MAJOR} )
201
+ target_compile_definitions (${amr_wind_lib_name} PUBLIC OPENFAST_VERSION_MINOR=${OPENFAST_VERSION_MINOR} )
197
202
endif ()
198
203
199
204
if (AMR_WIND_ENABLE_ASCENT)
Original file line number Diff line number Diff line change 21
21
#ifdef AMR_WIND_USE_ASCENT
22
22
#include " ascent_config.h"
23
23
#endif
24
+ #define STRINGIFY (x ) #x
25
+ #define TOSTRING (x ) STRINGIFY(x)
24
26
25
27
namespace amrex {
26
28
const char * buildInfoGetBuildDate ();
@@ -194,7 +196,9 @@ void print_tpls(std::ostream& out)
194
196
tpls.push_back (std::string (" HYPRE " ) + HYPRE_RELEASE_VERSION);
195
197
#endif
196
198
#ifdef AMR_WIND_USE_OPENFAST
197
- tpls.push_back (std::string (" OpenFAST " ));
199
+ std::string of_version =
200
+ TOSTRING (OPENFAST_VERSION_MAJOR) " ." TOSTRING (OPENFAST_VERSION_MINOR);
201
+ tpls.push_back (std::string (" OpenFAST " ) + of_version);
198
202
#endif
199
203
#ifdef AMR_WIND_USE_MASA
200
204
tpls.push_back (std::string (" MASA " ) + MASA_LIB_VERSION);
You can’t perform that action at this time.
0 commit comments