On Thu, Jan 11, 2018, at 08:52 CST, "'Maxi Miller' via deal.II User Group" 
<[email protected]> wrote:

> An initial investigation shows that DEAL_II_INVOKE_AUTOPILOT calls 
> add_executable, thus I placed the additional libraries after the macro. Is 
> that the correct way to solve it?

The best way would be to simply not use the DEAL_II_INVOKE_AUTOPILOT
macro :-)

A simple skeleton would be [1]:

  CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
  FIND_PACKAGE(deal.II 8.5.0 REQUIRED
    HINTS ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
    )
  DEAL_II_INITIALIZE_CACHED_VARIABLES()

  PROJECT(myproject)

  # other FIND_PACKAGE calls

  # other libraries, etc.

  ADD_EXECUTABLE(main main.cc)
  DEAL_II_SETUP_TARGET(main)
  TARGET_LINK_LIBRARIES(main ...)


You lose the automatic "debug", "release" and "run" targets - if you
want to get those back, simply add the following statements [2], [3].

Best,
Matthias

[1] https://www.dealii.org/8.5.0/users/cmakelists.html
[2] https://www.dealii.org/8.5.0/users/cmakelists.html#cmakesimple.build_type
[3] https://www.dealii.org/8.5.0/users/cmakelists.html#cmakesimple.run

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to