[hamradio-commits] [gnss-sdr] 247/251: Let the user specify a Python executable at configuration time: 'cmake -DPYTHON_EXECUTABLE=usr/local/bin/python ../ '

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.

commit 8be9ac859bf92e9d54ac92cce6ec798db8af9d71
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Fri Aug 28 20:06:24 2015 +0200

    Let the user specify a Python executable at configuration time: 'cmake
    -DPYTHON_EXECUTABLE=usr/local/bin/python ../ '
---
 CMakeLists.txt | 14 ++++++++++++--
 README.md      | 16 +++++++++++++---
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e60216..846ef36 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,14 +402,24 @@ if(ENABLE_PACKAGING)
     endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
 endif(ENABLE_PACKAGING)
 set(VOLK_GNSSSDR_BUILD_COMMAND "make")
+if(PYTHON_EXECUTABLE)
+     set(USE_THIS_PYTHON "-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}")
+endif(PYTHON_EXECUTABLE)
 if(OS_IS_MACOSX)
-    set(USE_MACPORTS_PYTHON "-DPYTHON_EXECUTABLE=/opt/local/bin/python")
+     if(NOT PYTHON_EXECUTABLE)
+         find_file(MAC_PYTHON python
+                   PATHS /opt/local/bin
+                         /usr/local/bin )
+         if(MAC_PYTHON)
+              set(USE_THIS_PYTHON "-DPYTHON_EXECUTABLE=${MAC_PYTHON}")
+         endif(MAC_PYTHON)
+     endif(NOT PYTHON_EXECUTABLE)
     if(CMAKE_GENERATOR STREQUAL Xcode)
         set(VOLK_GNSSSDR_BUILD_COMMAND "xcodebuild" "-configuration" "Debug" "-target")
     endif(CMAKE_GENERATOR STREQUAL Xcode)
 endif(OS_IS_MACOSX)
 if(NOT VOLK_GNSSSDR_FOUND)
-    set(VOLK_GNSSSDR_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install -DENABLE_STATIC_LIBS=ON ${STRIP_VOLK_GNSSSDR_PROFILE} ${USE_MACPORTS_PYTHON})
+    set(VOLK_GNSSSDR_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install -DENABLE_STATIC_LIBS=ON ${STRIP_VOLK_GNSSSDR_PROFILE} ${USE_THIS_PYTHON})
     if(CMAKE_TOOLCHAIN_FILE)
         set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
     endif(CMAKE_TOOLCHAIN_FILE)
diff --git a/README.md b/README.md
index bb52497..79f11c2 100644
--- a/README.md
+++ b/README.md
@@ -378,7 +378,7 @@ Using this option, all SIMD instructions are exclusively accessed via VOLK, whic
 
 ### Mac OS X 10.9 (Mavericks) and 10.10 (Yosemite)
 
-If you still have not installed [Xcode](http://developer.apple.com/xcode/), do it now from the App Store (it's free). You will also need the Xcode Command Line Tools. Launch the Terminal, found in /Applications/Utilities/, and type:
+If you still have not installed [Xcode](http://developer.apple.com/xcode/ "Xcode"), do it now from the App Store (it's free). You will also need the Xcode Command Line Tools. Launch the Terminal, found in /Applications/Utilities/, and type:
 
 ~~~~~~ 
 $ xcode-select --install
@@ -390,7 +390,7 @@ Agree to Xcode license:
 $ sudo xcodebuild -license
 ~~~~~~ 
 
-Then, [install Macports](http://www.macports.org/install.php). If you are upgrading from a previous installation, please follow the [migration rules](http://trac.macports.org/wiki/Migration).
+Then, you need a package manager. For example, you can [install Macports](http://www.macports.org/install.php "Macports"). If you are upgrading from a previous installation, please follow the [migration rules](http://trac.macports.org/wiki/Migration).
 
 In a terminal, type:
 
@@ -446,11 +446,21 @@ $ open ../docs/html/index.html
 
 GNSS-SDR comes with a library with some specific Vector-Optimized Library of Kernels (VOLK) and a profiler that will build a config file for the best SIMD architecture for your processor. Run ``volk_gnsssdr_profile`` that is installed into $PREFIX/bin. This program tests all known VOLK kernels for each architecture supported by the processor. When finished, it will write to $HOME/.volk_gnsssdr/volk_gnsssdr_config the best architecture for the VOLK function. This file is read when using a [...]
 
+###### Other package managers 
+
+GNU Radio and other dependencies can also be installed using other package managers than Macports, such as [Fink](http://www.finkproject.org/ "Fink") or [Homebrew](http://brew.sh/ "Homebrew"). Since the version of Python that ships with OS X is great for learning but it is not good for development, you could have another Python executable in a non-standard location. If that is the case, you need to inform GNSS-SDR's configuration system by defining the PYTHON_EXECUTABLE variable as:
+
+~~~~~~
+cmake -DPYTHON_EXECUTABLE=/path/to/bin/python ../
+~~~~~~ 
+
+The CMake script will create Makefiles that download, build and link Armadillo, Gflags, Glog and Google Test on the fly at compile time if they are not detected in your machine.
+
 
 Updating GNSS-SDR
 =================
 
-If you cloned GNSS-SDR some days ago, it is possible that some developer has updated files at the Git repository. You can update your working copy by doing:
+If you cloned GNSS-SDR some time ago, it is possible that some developer has updated files at the Git repository. You can update your working copy by doing:
 
 ~~~~~~ 
 $ git checkout master      # Switch to branch you want to update

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list