From d9b2a6e90045dc940f5edcf36d9ba2d14ce54d2c Mon Sep 17 00:00:00 2001
From: Max Kahnt <max.kahnt@fu-berlin.de>
Date: Fri, 11 Mar 2016 17:10:29 +0100
Subject: [PATCH] Make custom target for source files.

---
 dune/solvers/common/CMakeLists.txt         | 7 ++++++-
 dune/solvers/iterationsteps/CMakeLists.txt | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dune/solvers/common/CMakeLists.txt b/dune/solvers/common/CMakeLists.txt
index 7451cd6c..70e85ac0 100644
--- a/dune/solvers/common/CMakeLists.txt
+++ b/dune/solvers/common/CMakeLists.txt
@@ -1,4 +1,4 @@
-install(FILES
+set(DUNE_SOLVERS_COMMON
     arithmetic.hh
     boxconstraint.hh
     canignore.hh
@@ -8,4 +8,9 @@ install(FILES
     permutationmanager.hh
     preconditioner.hh
     staticmatrixtools.hh
+)
+
+add_custom_target(dune_solvers_common_sources SOURCES ${DUNE_SOLVERS_COMMON})
+
+install(FILES ${DUNE_SOLVERS_COMMON}
     DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/solvers/common)
diff --git a/dune/solvers/iterationsteps/CMakeLists.txt b/dune/solvers/iterationsteps/CMakeLists.txt
index f4e462c3..6bfe8c9b 100644
--- a/dune/solvers/iterationsteps/CMakeLists.txt
+++ b/dune/solvers/iterationsteps/CMakeLists.txt
@@ -1,4 +1,4 @@
-install(FILES
+set(DUNE_SOLVERS_ITERATIONSTEPS
     amgstep.hh
     blockgsstep.cc
     blockgsstep.hh
@@ -27,4 +27,9 @@ install(FILES
     truncatedsaddlepointgsstep.hh
     trustregiongsstep.cc
     trustregiongsstep.hh
+)
+
+add_custom_target(dune_solvers_iterationsteps_sources SOURCES ${DUNE_SOLVERS_ITERATIONSTEPS})
+
+install(FILES ${DUNE_SOLVERS_ITERATIONSTEPS}
     DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/solvers/iterationsteps)
-- 
GitLab