From e23e566f87891203839d32b53dcc6f22d31db59e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 21 Oct 2013 22:27:39 +0000 Subject: [PATCH] Fixes compilation in Mac OS X git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@427 64b25241-fba3-4117-9849-534c7e92360d --- CMakeLists.txt | 6 +++++- README | 27 +++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4614797c..34bb7f5b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,7 +492,11 @@ set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall") # See http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options # Change to '-mtune=generic' when building for distribution if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) - set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -march=native -mfpmath=sse") + if(OS_IS_MACOSX) + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -march=corei7 -mfpmath=sse") + else(OS_IS_MACOSX) + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -march=native -mfpmath=sse") + endif(OS_IS_MACOSX) endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) diff --git a/README b/README index 1af03d519..f8656d25b 100644 --- a/README +++ b/README @@ -239,19 +239,38 @@ $ rm -rf gnss-sdr/build/* Mac OS X ------------------------------ -Tested version: 10.8.2 (Mountain Lion) +Tested version: 10.8.5 (Mountain Lion) -If you have still not installed Apple's Xcode Developer Tools and MacPorts, please do it now following the instructions from http://www.macports.org/install.php. All the required packages are available for free. +If you still have not installed Xcode, do it now from the App Store (it's free). Once installed, download and install the command line tools: + +Xcode -> Preferences -> Downloads -> Components -> Command Line Tools + +Then, install Macports via Mac OS X Package (.pkg) installer from http://www.macports.org/install.php Once MacPorts is properly installed on your system, open a terminal and type: +$ sudo port selfupdate $ sudo port install gcc48 $ sudo port select --set gcc mp-gcc48 + +Install X11 via XQuartz-2.7.4.dmg (needed by gnuradio-companion but not by GNSS-SDR) from http://xquartz.macosforge.org/landing/ + +Install GNU Radio: + $ sudo port install gnuradio +full -$ sudo port install subversion + +Install other dependencies: + +$ sudo port install subversion armadillo + +The libraries gflags and glog should be installed manually, and in that particular order (same steps as above). If they are not already installed +when building GNSS-SDR, cmake will download, build and link them statically but they will not remain installed in the system. + +Finally, you are ready to checkout the GNSS-SDR repository and build the software: + $ svn co http://svn.code.sf.net/p/gnss-sdr/code/trunk gnss-sdr $ cd gnss-sdr/build -$ cmake ../ -DCMAKE_CXX_COMPILER=gcc +$ cmake ../ -DCMAKE_CXX_COMPILER=g++ $ make $ make install