Dear Daniel and Prof. Bangerth,

I did exactly as you suggested. My package export cmake configurations. I 
am getting the following error and cant figure out the reason. It is not 
able to link the executable with the package.

CMake Error at CMakeLists.txt:42 (TARGET_LINK_LIBRARIES):
  Cannot specify link libraries for target
  "Quasi_Static_Finite_Strain_Beam_Buckling_Analysis" which is not built by
  this project.


-- Configuring incomplete, errors occurred!
See also 
"/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/CMakeFiles/CMakeOutput.log".

I am attaching the cmakelists.txt for your reference.

Thanks!
Animesh

On Friday, December 18, 2020 at 1:33:47 AM UTC+5:30 Wolfgang Bangerth wrote:

> On 12/17/20 12:54 PM, Daniel Arndt wrote:
> > 
> > in the CMakeLists.txt for your project.
>
> In other words, you don't need to do anything about deal.II itself at all 
> unless you plan on modifying deal.II to use these external libraries.
>
> Best
> W.
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7b9b3f53-0c02-4de7-8322-e998a957b253n%40googlegroups.com.
##
#  CMake script for the step-<XYZ> tutorial program:
##

# Set the name of the project and target:
SET(TARGET "Quasi_Static_Finite_Strain_Beam_Buckling_Analysis")

# Declare all source files the target consists of:
SET(TARGET_SRC
  ${TARGET}.cc
  # You can specify additional files here!
  )

SET(CLEAN_UP_FILES
  # a custom list of globs, e.g. *.log *.vtk
  *.vtk
)


# Usually, you will not need to modify anything beyond this point...

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)


FIND_PACKAGE(deal.II 9.1 QUIET
  HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
  )
IF(NOT ${deal.II_FOUND})
  MESSAGE(FATAL_ERROR "\n"
    "*** Could not locate deal.II. ***\n\n"
    "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to 
cmake\n"
    "or set an environment variable \"DEAL_II_DIR\" that contains this path."
    )
ENDIF()
FIND_PACKAGE(Eigen3 REQUIRED)
FIND_PACKAGE(Spectra REQUIRED)
TARGET_LINK_LIBRARIES(Quasi_Static_Finite_Strain_Beam_Buckling_Analysis 
Spectra::Spectra)

DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET})

DEAL_II_INVOKE_AUTOPILOT()

Reply via email to