You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something is not right with our cmake setup for plugins and the interaction with the different build types for ASPECT.
If I build ASPECT in release mode only I can no longer compile external plugins that try to link to that ASPECT build folder. I see the following error message (path shortened for readability):
.../finite_strain.cc:21:10: fatal error: aspect/material_model/simple.h: No such file or directory
21 | #include <aspect/material_model/simple.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/finite_strain.dir/build.make:76: CMakeFiles/finite_strain.dir/finite_strain.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/finite_strain.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 75%] Built target finite_strain.release
make: *** [Makefile:136: all] Error 2
If I set up ASPECT in Debug or DebugRelease mode (just running cmake is enough, actually building not required) everything works as expected.
For my problem: When I run make -n I see that the compile/include flags are not set (only showing relevant line):
I have been poking around in here and to me it looks like we create the release target of the plugin with some dependency on the regular target. But the regular target seems to be set up as well, but does not get assigned any flags.
I have found a workaround: If I run make finite_strain.release everything compiles, but make creates the error above. That looks to me like the build is trying to build the target finite_strain (which is set up in my CMakeLists) as well, but that is not set up correctly by the plugin macro.
I'm sure too. I will have to investigate. I think I will have to make the same kind of changes to the plugin cmake scripts as I made to the ASPECT cmake scripts themselves...
Something is not right with our cmake setup for plugins and the interaction with the different build types for ASPECT.
If I build ASPECT in release mode only I can no longer compile external plugins that try to link to that ASPECT build folder. I see the following error message (path shortened for readability):
If I set up ASPECT in Debug or DebugRelease mode (just running cmake is enough, actually building not required) everything works as expected.
For my problem: When I run
make -n
I see that the compile/include flags are not set (only showing relevant line):I have been poking around in here and to me it looks like we create the release target of the plugin with some dependency on the regular target. But the regular target seems to be set up as well, but does not get assigned any flags.
I have found a workaround: If I run
make finite_strain.release
everything compiles, butmake
creates the error above. That looks to me like the build is trying to build the targetfinite_strain
(which is set up in my CMakeLists) as well, but that is not set up correctly by the plugin macro.Files to reproduce with an ASPECT build folder that is only set to RELEASE build type:
CMakeLists.txt
finite_strain.cc.txt
Do we need to modify the plugin macro or the CMakeLists.txt?
The text was updated successfully, but these errors were encountered: