From 1146caec5b980b84109c58fa6410aa57bb14b859 Mon Sep 17 00:00:00 2001
From: Jean-Matthieu Etancelin <jean-matthieu.etancelin@univ-pau.fr>
Date: Mon, 4 Jun 2018 16:00:34 +0200
Subject: [PATCH] add pythonlib to fortran ld flags. Fix description of test.sh

---
 CMakeLists.txt     | 3 +++
 ci/scripts/test.sh | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
 mode change 100644 => 100755 ci/scripts/test.sh

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3cf4f903d..c765b2d36 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -443,6 +443,9 @@ if(USE_CXX)
     set(CPP_2_HYSOP "cpp2hysop")
 endif()
 
+# Append pythonlib to hysop link floags
+list(APPEND HYSOP_LINK_LIBRARIES ${PYTHON_LIBRARIES} )
+
 # ====== Generates python files required for build/install process ======
 # The file setup.py will be generated from setup.py.in.
 if(EXISTS ${CMAKE_SOURCE_DIR}/setup.py.in)
diff --git a/ci/scripts/test.sh b/ci/scripts/test.sh
old mode 100644
new mode 100755
index 65adde1d2..eceb2693f
--- a/ci/scripts/test.sh
+++ b/ci/scripts/test.sh
@@ -2,19 +2,19 @@
 set -e
 
 if [ $# -ne 3 ]; then
-    echo "Usage ./test install_folder hysop_folder"
+    echo "Usage ./test install_folder hysop_folder cache_dir"
     exit 1
 fi
 
 if [ ! -d "$1" ]; then
     echo "Folder $1 does not exist."
     exit 1
-fi 
+fi
 
 if [ ! -d "$2" ]; then
     echo "Folder $2 does not exist."
     exit 1
-fi 
+fi
 
 INSTALL_DIR=$1
 HYSOP_DIR=$2
@@ -27,7 +27,7 @@ if [ -d "$CACHE_DIR" ]; then
 else
     echo "Cache directory '$CACHE_DIR' was not found."
     mkdir -p $CACHE_DIR
-fi 
+fi
 
 export PYTHONPATH="$INSTALL_DIR/lib/python2.7/site-packages"
 python -c 'import hysop; print hysop'
-- 
GitLab