[Kst] branches/work/kst/portto4/kst

Peter Kümmel syntheticpp at gmx.net
Tue Jul 10 19:44:57 UTC 2012


SVN commit 1305119 by kuemmel:

use system NumPy/SciPy on Linux by default

 M  +21 -18    INSTALL  
 M  +2 -2      cmake/CMakeLists.txt  
 M  +1 -1      cmake/modules/KstMacros.cmake  
 M  +23 -5     cmake/pyKst/CMakeLists.txt  


--- branches/work/kst/portto4/kst/INSTALL #1305118:1305119
@@ -105,25 +105,28 @@
 	Available options will be listed on each cmake run.
 	Here the options with their default value:
 
-	-- kst_version_string       = ON     : Version string
-	-- kst_release              = OFF    : Build release version: optimize for speed, don't embedded debug symbols
-	-- kst_merge_files          = OFF    : Merge files to speedup build about factor 5
-	-- kst_merge_rebuild        = OFF    : Rebuild generated files from merged files build
-	-- kst_verbose              = OFF    : Make verbose CMake run and Makefiles
-	-- kst_install_prefix       = ON     : Install path for Kst, using a default if not set
-	-- kst_install_libdir       = ON     : Install directory name for libraries
-	-- kst_3rdparty             = ON     : Build plugins depending on 3rd party libraries
-	-- kst_dataobjects          = ON     : Build dataobject plugins
-	-- kst_test                 = OFF    : Build unit tests
-	-- kst_pch                  = ON     : Use precompiled headers
-	-- kst_svnversion           = ON     : Use svnversion's output for Kst's version information
-	-- kst_rpath                = ON     : Use rpath
-	-- kst_3rdparty_build       = OFF    : Download and build 3rd party libraries
-	-- kst_3rdparty_download    = OFF    : Download precompiled 3rd party libraries
-	-- kst_console              = OFF    : Open console on Windows
-	-- kst_edit_cont            = OFF    : Enable "Edit and Continue" for Visual Studio
-	-- kst_python               = OFF    : Build Python suppor
+    -- kst_version_string       = 2.0.x   : Version string. 
+    -- kst_release              = OFF   : Build release version: optimize for speed, don't embedded debug symbols. Toggle with '-Dkst_release=1'
+    -- kst_deploy               = OFF   : Deploy into install dir. Toggle with '-Dkst_deploy=1'
+    -- kst_merge_files          = OFF   : Merge files to speedup build about factor 5. Toggle with '-Dkst_merge_files=1'
+    -- kst_merge_rebuild        = OFF   : Rebuild generated files from merged files build. Toggle with '-Dkst_merge_rebuild=1'
+    -- kst_verbose              = OFF   : Make verbose CMake run and Makefiles. Toggle with '-Dkst_verbose=1'
+    -- kst_install_prefix       = /home/synth/sandbox/kst/kst/_b/INSTALLED   : Install path for Kst, using a default if not set. 
+    -- kst_install_libdir       = lib   : Install directory name for libraries. 
+    -- kst_3rdparty             = ON    : Build plugins depending on 3rd party libraries. Toggle with '-Dkst_3rdparty=0'
+    -- kst_dataobjects          = ON    : Build dataobject plugins. Toggle with '-Dkst_dataobjects=0'
+    -- kst_test                 = OFF   : Build unit tests. Toggle with '-Dkst_test=1'
+    -- kst_pch                  = ON    : Use precompiled headers. Toggle with '-Dkst_pch=0'
+    -- kst_svnversion           = ON    : Use svnversion's output for Kst's version information. Toggle with '-Dkst_svnversion=0'
+    -- kst_rpath                = OFF   : Use rpath. Toggle with '-Dkst_rpath=1'
+    -- kst_3rdparty_build       = OFF   : Download and build 3rd party libraries. Toggle with '-Dkst_3rdparty_build=1'
+    -- kst_3rdparty_download    = OFF   : Download precompiled 3rd party libraries. Toggle with '-Dkst_3rdparty_download=1'
+    -- kst_console              = OFF   : Open console on Windows. Toggle with '-Dkst_console=1'
+    -- kst_edit_cont            = OFF   : Enable "Edit and Continue" for Visual Studio. Toggle with '-Dkst_edit_cont=1'
+    -- kst_python               = OFF   : Install Python support. Toggle with '-Dkst_python=1'
+    -- kst_python_build         = OFF   : Download and build NumPy/SciPy then install Python support. Toggle with '-Dkst_python_build=1'
 
+
 	To enable a option pass the value ON or 1, eg
 		cmake ../kst/cmake -Dkst_merge_files=1
 
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1305118:1305119
@@ -37,9 +37,9 @@
 kst_option(bool   OFF win 3rdparty_download "Download precompiled 3rd party libraries")
 kst_option(bool   OFF win console           "Open console on Windows")
 kst_option(bool   OFF win edit_cont         "Enable \"Edit and Continue\" for Visual Studio")
-kst_option(bool   OFF all python            "Build Python support")
+kst_option(bool   OFF all python            "Install Python support")
+kst_option(bool   OFF all python_build      "Download and build NumPy/SciPy then install Python support")
 
-
 message(STATUS)
 
 
--- branches/work/kst/portto4/kst/cmake/modules/KstMacros.cmake #1305118:1305119
@@ -256,7 +256,7 @@
 macro(kst_option_list_all)
 	foreach(_option ${kst_options})
 		if(${${_option}_show_message})
-			string(SUBSTRING "${_option}                            " 0 20 _var)
+			string(SUBSTRING "${_option}                            " 0 25 _var)
 			if(${_option}_type MATCHES "bool")
 				if(${_option})
 					set(_val  "ON ")
--- branches/work/kst/portto4/kst/cmake/pyKst/CMakeLists.txt #1305118:1305119
@@ -2,6 +2,7 @@
 
 project(pyKst)
 
+
 if(kst_binary_name) #stand-alone?
     set(kstpydir ${CMAKE_SOURCE_DIR}/..)
 else()
@@ -12,7 +13,27 @@
 find_package(PythonInterp REQUIRED)
 find_package(PythonLibs REQUIRED)
 
+# find install path for pykst files
+execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/finddistdir.py
+                OUTPUT_VARIABLE pydist_dir
+                OUTPUT_STRIP_TRAILING_WHITESPACE)
 
+if(NOT kst_python_build)
+    macro(checkversion _name _required)
+        string(TOUPPER ${_name} _n)
+        if(${${_n}_VERSION} VERSION_LESS ${_required})
+            message(FATAL_ERROR "Python support: '${_name}' is too old (${${_n}_VERSION} < ${_required})")
+        endif()
+    endmacro()
+    include(CMakePackageConfigHelpers)
+    find_package(NumPy REQUIRED)
+    checkversion(NumPy 1.6.0)
+    find_package(SciPy REQUIRED)
+    checkversion(SciPy 0.10.0)
+endif()
+
+
+if(kst_python_build)
 if(WIN32)
     # Python 2.6(7?)    : http://www.python.org/getit/windows
     # NumPy/Scipy (bin) : http://www.lfd.uci.edu/~gohlke/pythonlibs
@@ -50,14 +71,11 @@
                         INSTALL_COMMAND   sudo python setup.py install)
 endif()
 
-
-# find install path for pykst files
-execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/finddistdir.py
-                OUTPUT_VARIABLE pydist_dir
-                OUTPUT_STRIP_TRAILING_WHITESPACE)
 message(STATUS "Python support: installing Kst's python files into '${pydist_dir}'")
 message(STATUS)
+endif()
 
+
 set(pykstpp_header ${CMAKE_CURRENT_BINARY_DIR}/pykstpp_h.py)
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pykstpp_h.py.cmake ${pykstpp_header})
 


More information about the Kst mailing list