From bfbf60be459f855df922a461b80b3b5867cf5ec4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Santiago=20Ospina=20De=20Los=20R=C3=ADos?=
 <sospinar@gmail.com>
Date: Mon, 8 Feb 2021 08:25:39 +0100
Subject: [PATCH] Set directory to sources

---
 CMakeLists.txt     | 6 +++---
 src/CMakeLists.txt | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 40a4d4a3b..62bb65803 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,9 +4,9 @@ project(dune-copasi CXX)
 include(GNUInstallDirs)
 
 cmake_policy(SET CMP0074 NEW)
-# if(POLICY CMP0087)
-#   cmake_policy(SET CMP0087 OLD)
-# endif()
+if(POLICY CMP0087)
+  cmake_policy(SET CMP0087 OLD)
+endif()
 
 # define cmake options
 option(DUNE_COPASI_SD_EXECUTABLE
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 083018ea2..822b41fd0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,7 +5,7 @@ target_sources(dune-copasi
 )
 
 # set up single-domain executable
-add_executable(singledomain-exec EXCLUDE_FROM_ALL dune_copasi_sd.cc)
+add_executable(singledomain-exec EXCLUDE_FROM_ALL "${CMAKE_CURRENT_SOURCE_DIR}/dune_copasi_sd.cc")
 target_link_libraries(singledomain-exec PRIVATE dune-copasi)
 if(DUNE_COPASI_SD_EXECUTABLE)
   set_target_properties(singledomain-exec PROPERTIES EXCLUDE_FROM_ALL OFF)
@@ -18,7 +18,7 @@ endif()
 set_property(TARGET singledomain-exec PROPERTY RUNTIME_OUTPUT_NAME dune-copasi-sd)
 
 # set up multi-domain executable
-add_executable(multidomain-exec EXCLUDE_FROM_ALL dune_copasi_md.cc)
+add_executable(multidomain-exec EXCLUDE_FROM_ALL "${CMAKE_CURRENT_SOURCE_DIR}/dune_copasi_md.cc")
 target_link_libraries(multidomain-exec PRIVATE dune-copasi)
 if(DUNE_COPASI_MD_EXECUTABLE)
   set_target_properties(multidomain-exec PROPERTIES EXCLUDE_FROM_ALL OFF)
-- 
GitLab