diff --git a/CMakeLists.txt b/CMakeLists.txt index 97f7a12e97..101ea12a4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,19 @@ # #============================================================================= +if("${CMAKE_VERSION}" VERSION_LESS 2.8.0) + message("Not a valid CMake version") + message("On Ubuntu 16.04, install or upgrade via:") + message(" sudo apt-get install cmake") + message("") + message("Official website:") + message(" wget https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.sh") + message(" chmod +x cmake-3.4.3-Linux-x86_64.sh") + message(" sudo mkdir /opt/cmake-3.4.3") + message(" sudo ./cmake-3.4.3-Linux-x86_64.sh --prefix=/opt/cmake-3.4.3 --exclude-subdir") + message(" export PATH=/opt/cmake-3.4.3/bin:$$PATH") +endif() + # Warning: Changing this modifies CMake's internal workings # and leads to wrong toolchain detection cmake_minimum_required(VERSION 2.8 FATAL_ERROR) @@ -129,10 +142,6 @@ execute_process( WORKING_DIRECTORY ${PX4_SOURCE_DIR} ) -# Use clang -#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6) -#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6) - #============================================================================= # parameters # diff --git a/Makefile b/Makefile index 53346ffd00..8fdfcf2bce 100755 --- a/Makefile +++ b/Makefile @@ -39,26 +39,6 @@ ifeq ($(wildcard .git),) $(error YOU HAVE TO USE GIT TO DOWNLOAD THIS REPOSITORY. ABORTING.) endif -CMAKE_VER := $(shell Tools/check_cmake.sh; echo $$?) -ifneq ($(CMAKE_VER),0) - $(warning Not a valid CMake version or CMake not installed.) - $(warning On Ubuntu 16.04, install or upgrade via:) - $(warning ) - $(warning 3rd party PPA:) - $(warning sudo add-apt-repository ppa:george-edison55/cmake-3.x -y) - $(warning sudo apt-get update) - $(warning sudo apt-get install cmake) - $(warning ) - $(warning Official website:) - $(warning wget https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.sh) - $(warning chmod +x cmake-3.4.3-Linux-x86_64.sh) - $(warning sudo mkdir /opt/cmake-3.4.3) - $(warning sudo ./cmake-3.4.3-Linux-x86_64.sh --prefix=/opt/cmake-3.4.3 --exclude-subdir) - $(warning export PATH=/opt/cmake-3.4.3/bin:$$PATH) - $(warning ) - $(error Fatal) -endif - # Help # -------------------------------------------------------------------- # Don't be afraid of this makefile, it is just passing diff --git a/Tools/check_cmake.sh b/Tools/check_cmake.sh deleted file mode 100755 index 6c9ba61a9d..0000000000 --- a/Tools/check_cmake.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -cmake_ver=`cmake --version` - -if [[ $cmake_ver == "" ]] -then - exit 1; -fi - -if [[ $cmake_ver == *" 2.8"* ]] || [[ $cmake_ver == *" 2.9"* ]] || [[ $cmake_ver == *" 3.0"* ]] || [[ $cmake_ver == *" 3.1"* ]] -then - exit 1; -fi - -exit 0;