Re: [deal.II] Using external libraries with deal.II

2020-12-23 Thread Animesh Rastogi IIT Gandhinagar
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

Re: [deal.II] Using external libraries with deal.II

2020-12-21 Thread Matthias Maier
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

Re: [deal.II] Using external libraries with deal.II

2020-12-21 Thread Wolfgang Bangerth
Animesh, 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 librarie

Re: [deal.II] Using external libraries with deal.II

2020-12-21 Thread Animesh Rastogi IIT Gandhinagar
What I understood after struggling through the issue is that my cmakelists.txt is in autopilot style. In the autopilot style, it doesn't build the executable right away after doing "cmake .". It builds the executable after I run "make" command (as per my observation). I think this is why it is

Re: [deal.II] Using external libraries with deal.II

2020-12-21 Thread Animesh Rastogi IIT Gandhinagar
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 spe

Re: [deal.II] Using external libraries with deal.II

2020-12-17 Thread Wolfgang Bangerth
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. --

Re: [deal.II] Using external libraries with deal.II

2020-12-17 Thread Daniel Arndt
Animesh, Assuming that the packages export CMake configurations you can just do a standard find_package(Spectra REQUIRED) target_link_libraries(my_project Spectra::Spectra) in the CMakeLists.txt for your project. Best, Daniel Am Do., 17. Dez. 2020 um 14:19 Uhr schrieb Animesh Rastogi IIT Gandh

[deal.II] Using external libraries with deal.II

2020-12-17 Thread Animesh Rastogi IIT Gandhinagar
Dear deal.II community I would like to use some external libraries such as Eigen and Spectra in dealii for one of my projects. These are both header-only C++ libraries. Could someone please tell me about how to integrate these libraries (installed in my system) with dealii? What changes do I ne