forked from Archive/PX4-Autopilot
move cmake version check into cmake
This commit is contained in:
parent
9ea80e9ff0
commit
ac7c309925
|
@ -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
|
||||
#
|
||||
|
|
20
Makefile
20
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
|
||||
|
|
|
@ -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;
|
Loading…
Reference in New Issue