Dear Prof. Maier and Prof. Bangerth,

Thank you for your help. I was able to fix the issue with your suggestions.

Animesh

On Tuesday, December 22, 2020 at 1:41:08 AM UTC+5:30 Matthias Maier wrote:

> Hi,
>
> No, the problem is much simpler. You have to reorganize your
> CMakeLists.txt so that you search for your libraries and add them to
> your link interface after the PROJECT() call and after the
> DEAL_II_INVOKE_AUTOPILOT CALL(). It is simplest to put everything last:
>
>
> # The default CMakeLists.txt file does the following:
>
> FIND_PACKAGE(deal.II 9.1 QUIET [...]) # finds deal.II configuration
>
> DEAL_II_INITIALIZE_CACHED_VARIABLES() # sets compiler and other cached 
> variables
> PROJECT(${TARGET}) # initializes compiler toolchain
>
> DEAL_II_INVOKE_AUTOPILOT() # defines executable target with the name 
> stored in
> # variable "${TARGET}"
>
>
> # NOW, you can search for your external libraries:
>
> FIND_PACKAGE(Eigen3 REQUIRED)
> FIND_PACKAGE(Spectra REQUIRED)
>
> # and NOW you can add them to the target. (Simply use the variable
> # ${TARGET} where you already stored the name of the project):
>
> TARGET_LINK_LIBRARIES(${TARGET} Spectra::Spectra)
>
>
>
> Best,
> Matthias
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/f5d2baf9-f8b6-42bf-848d-f1b7a4a1ab71n%40googlegroups.com.

Reply via email to