Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
529d9b4d
Commit
529d9b4d
authored
9 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Patches
Plain Diff
Check and enforce CMake version
parent
dab48553
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
Makefile
+13
-1
13 additions, 1 deletion
Makefile
Tools/check_cmake.sh
+14
-0
14 additions, 0 deletions
Tools/check_cmake.sh
with
28 additions
and
1 deletion
CMakeLists.txt
+
1
−
0
View file @
529d9b4d
...
...
@@ -186,6 +186,7 @@ project(px4 CXX C ASM)
if
(
NOT
${
CMAKE_VERSION
}
VERSION_LESS 3.0.0
)
cmake_policy
(
SET CMP0045 NEW
)
# error on non-existent target in get prop
cmake_policy
(
SET CMP0046 NEW
)
# no non-existent targets as dependencies
cmake_policy
(
SET CMP0025 OLD
)
# still report AppleClang as Clang
endif
()
if
(
NOT
${
CMAKE_VERSION
}
VERSION_LESS 3.1.0
)
cmake_policy
(
SET CMP0054 NEW
)
# don't dereference quoted variables
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
13
−
1
View file @
529d9b4d
...
...
@@ -36,7 +36,19 @@
# We depend on our submodules, so we have to prevent attempts to
# compile without it being present.
ifeq
($(wildcard .git),)
$(
error
YOU HAVE TO USE GIT TO DOWNLOAD THIS REPOSITORY. ABORTING.
)
$(
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, install or upgrade via
:
)
$(
warning
)
$(warning sudo add-apt-repository ppa
:
george-edison55/cmake-3.x -y)
$(
warning
sudo
apt-get update
)
$(
warning
sudo
apt-get
install
cmake
)
$(
warning
)
$(
error
Fatal
)
endif
# Help
...
...
This diff is collapsed.
Click to expand it.
Tools/check_cmake.sh
0 → 100755
+
14
−
0
View file @
529d9b4d
#!/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
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment