aspect icon indicating copy to clipboard operation
aspect copied to clipboard

Use TARGET_LINK_LIBRARIES instead of DEAL_II_SETUP_TARGET.

Open bangerth opened this issue 8 months ago • 3 comments

This should fix #5632, but it does not work. I get the following error:

CMake Error at CMakeLists.txt:553 (target_link_libraries):
  Target "aspect" links to:

    dealii::dealii_debug

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at CMakeLists.txt:556 (target_link_libraries):
  Target "aspect-release" links to:

    dealii::dealii_release

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

I must admit that I'm confused why this is so. I declare the target in the line immediately above, so it should exist. I looked at how @tamiko does this in ryujin, see https://github.com/conservation-laws/ryujin/blob/development/source/CMakeLists.txt#L31-L37, with EXTERNAL_TARGETS set in https://github.com/conservation-laws/ryujin/blob/development/CMakeLists.txt#L157-L182 So in ryujin, he still calls deal_ii_setup_target anyway.

@tjhei @tamiko Help appreciated!

bangerth avatar Jun 01 '24 17:06 bangerth