Always build openfastcpplib as shared. Use BUILD_OPENFAST_CPP_DRIVER to disable openfastcpp executable #2311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is ready to merge.
Feature or improvement description
This PR makes
openfastcpplib
always build as a shared library soBUILD_SHARED_LIBS=ON
is not needed for AMR-WIND. This PR also usesBUILD_OPENFAST_CPP_DRIVER
to control whetheropenfastcpp
is built or not. SettingBUILD_OPENFAST_CPP_DRIVER=OFF
andBUILD_OPENFAST_CPP_API=ON
will allowopenfastcpplib
to be built for AMR-WIND without needingyaml-cpp
which has been a problem on some platforms like Kestrel.Related issue, if one exists
Impacted areas of the software
Only the openfast-cpp CMakeLists.txt was changed.
Additional supporting information
This change reuses
BUILD_OPENFAST_CPP_DRIVER
which previously only controlled ifopenfast_cpp_driver
was built. It may be better to use a separate flag, but it would be difficult to find a better name since both of these executables are C++ drivers. Also,openfastcpp
is only built whenBUILD_OPENFAST_CPP_API=ON
.Test results, if applicable
No tests were affected