Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove openfast_cpp target if BUILD_OPENFAST_CPP_API not selected #1586

Merged
merged 5 commits into from
Oct 13, 2023

Conversation

andrew-platt
Copy link
Collaborator

Ready to merge

Feature or improvement description
If BUILD_OPENFAST_CPP_API is false and make or make all is used to build, the openfast_cpp target is built. This can pose issues on some systems if the user is not expecting it and doesn't have locations to all necessary libraries specified.

Also noticed that the NodeClusterType input for OpenFOAM was inconsistently handled as integers or logicals. Changed it all to integer to maintain consistency with checks used in the code.

Impacted areas of the software
Interfacing to SOWFA or other CFD.
CMake default builds

Additional supporting information
@mchurchf ran into compile issue on Eagle.

Test results, if applicable
None.

@andrew-platt andrew-platt added this to the v3.5.1 milestone May 23, 2023
@andrew-platt andrew-platt requested a review from deslaughter May 23, 2023 19:54
@andrew-platt andrew-platt force-pushed the b/cpp_api_compile branch 2 times, most recently from 7a6c341 to c13f13e Compare May 23, 2023 20:14
Copy link
Collaborator

@deslaughter deslaughter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you also going to wrap openfastcpp in BUILD_OPENFAST_CPP_DRIVER? If so, the conditional for regression test of_cpp_interface_regression will also need to be updated.

RUNTIME DESTINATION bin)

if(BUILD_OPENFAST_CPP_API AND BUILD_OPENFAST_CPP_DRIVER)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

openfast_cpp_driverdoesn't use the openfastcpplib, does it need to check for BUILD_OPENFAST_CPP_API?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to make another pass through the logic here. There are a couple other minor things I think should be addressed.


install(TARGETS openfast_cpp_driver
RUNTIME DESTINATION bin)
endif(BUILD_OPENFAST_CPP_API AND BUILD_OPENFAST_CPP_DRIVER)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we not repeat the condition at the end of the block? endif() is sufficient for CMake.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, old habits ;)

@deslaughter
Copy link
Collaborator

Looking back at this, I find it a little strange that FastLibAPI.h and FastLibAPI.cpp are part of the glue code. It seems like they should be in openfast-library and create a C++ library like openfastlib_cpp to provide access to OpenFAST from C++. This doesn't need to be changed, just something to consider in the future.

@deslaughter deslaughter merged commit c55e801 into OpenFAST:rc-3.5.1 Oct 13, 2023
19 checks passed
@deslaughter deslaughter deleted the b/cpp_api_compile branch October 13, 2023 13:34
@andrew-platt andrew-platt mentioned this pull request Oct 19, 2023
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants