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

Fix plugin cmake for release only #6070

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

gassmoeller
Copy link
Member

This PR is a fix for #6017. The problem was that if we build ASPECT in release only mode and then set up an external library, the user already sets up a target with the original library name (${_target}) in the CMakeLists.txt of the plugin. Then the macro in AspectConfig.cmake.in would set up another target with name ${_target}.release, and only for this additional target would it configure the correct include files. But when running make the makefile would then try to compile both targets (with the same sources, but only one of them had correctly configured header files).

I changed the macro to now reuse the target name from the user CMakeLists for the release library. If no debug library is compiled, no new target name is necessary (this means the release target has a different name depending on whether a debug target exists).

I also modified the creation of the symbolic links at the end, so that all existing ASPECT executables (aspect-debug and/or aspect-release) and the generic link aspect are available in the plugin directory.

@tjhei tjhei merged commit bb42d81 into geodynamics:main Oct 11, 2024
8 checks passed
@tjhei
Copy link
Member

tjhei commented Oct 11, 2024

Awesome, thank you.

@gassmoeller gassmoeller deleted the fix_only_release_cmake_setup branch October 13, 2024 13:32
@bangerth
Copy link
Contributor

Thanks, and my apologies for not getting around to this in time :-(

@gassmoeller
Copy link
Member Author

No worries, luckily once I had read myself into the CMake file it was simpler than expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants