Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved configuring GSL into CMake

  • Loading branch information...
commit 28b10e14120ae10842802e11a729a5ac7d1d70a3 1 parent 54998d1
@pjotrp authored
Showing with 21 additions and 6 deletions.
  1. +6 −6 configure
  2. +15 −0 src/clibs/gsl/src/CMakeLists.txt
View
12 configure
@@ -19,6 +19,12 @@ if [ ! -d ./src ]; then
exit 1
fi
+if [ -d .git ]; then
+ echo "Updating git submodules"
+ git submodule init
+ git submodule update
+fi
+
language=$1
if [ -z $language ]; then
language='--with-perl'
@@ -67,11 +73,5 @@ echo $library: $plib
sh scripts/cleanup.sh
-echo "**** Prepare the GSL..."
-cd contrib/gsl/
-./autogen.sh
-./configure --enable-maintainer-mode
-cd ../..
-
echo cmake $plang $plib $* .
cmake $plang $plib $* .
View
15 src/clibs/gsl/src/CMakeLists.txt
@@ -14,6 +14,8 @@ ENDIF(NOT BUILD_LIBS)
FIND_PACKAGE(Map)
+SET(GSL_CONTRIB_PATH ${MAP_ROOT}/contrib/gsl)
+
SET(LIBNAME ${MAP_projectname}_gsl-${MAP_VERSION}) # shared library name
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ../build)
@@ -21,6 +23,19 @@ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ../build)
INCLUDE_DIRECTORIES(.)
INCLUDE_DIRECTORIES(./gsl)
+SET(GSL_CONFIG ${GSL_CONTRIB_PATH}/config.h)
+
+IF (NOT EXISTS ${GSL_CONFIG})
+ message("Configuring ./contrib/gsl")
+ EXECUTE_PROCESS(
+ COMMAND /bin/bash -c ./autogen.sh
+ COMMAND /bin/bash -c ./configure --enable-maintainer-mode
+ WORKING_DIRECTORY ${GSL_CONTRIB_PATH}
+ RESULT_VARIABLE result_gsl
+ )
+ message("Finished configuring ./contrib/gsl ${result_gsl}")
+ENDIF (NOT EXISTS ${GSL_CONFIG})
+
ADD_LIBRARY(${LIBNAME} SHARED
../../../../contrib/gsl/statistics/minmax.c
../../../../contrib/gsl/statistics/mean.c
Please sign in to comment.
Something went wrong with that request. Please try again.