• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/fastd/0002-CMakeList-do-not-overwrite-module-path.patch
Yann E. MORINYann E. MORIN committed 3712d175d4b02 Mar 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From a925a4cab1b722a2a24b0c1d2a1925f3b766de61 Mon Sep 17 00:00:00 2001
2
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
3
Date: Thu, 2 Mar 2017 21:43:39 +0100
4
Subject: [PATCH] CMakeList: do not overwrite module path
5
​
6
Currently, the CMakeList.txt completely overwrites the CMAKE_MODULE_PATH
7
variable.
8
​
9
This is problematic when an upper-layer buildsystem wants to set its own
10
module path to use custom modules.
11
​
12
For example, Buldroot [0] provides a custom platform description [1] to fix
13
cross-compilation issue. Overwriting the module path means that this
14
custom platform description is not found [2].
15
​
16
Providing such a custom platform description is what the upstream cmake
17
devs suggest [3], quoting:
18
​
19
    If a toolchain file specifies CMAKE_SYSTEM_NAME such that a custom
20
    `Platform/MySystem.cmake` file is loaded then the latter can set
21
    them [*] as needed for the target platform.
22
​
23
[*] offending settings causing RPATH issues during cross-compilation.
24
​
25
So we need to append our source tree to the module path, not replace it
26
blindly.
27
​
28
[0] https://buildroot.org/
29
[1] https://git.buildroot.org/buildroot/tree/support/misc/Buildroot.cmake
30
[2] http://autobuild.buildroot.net/results/69f/69fb2e3b549a069e2898506db918423e6742c589/build-end.log
31
[3] http://public.kitware.com/pipermail/cmake/2017-February/065063.html
32
​
33
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
34
---
35
Patch applied upstream:
36
https://git.universe-factory.net/fastd/commit/?id=a925a4cab1b722a2a24b0c1d2a1925f3b766de61
37
​
38
---
39
 CMakeLists.txt | 2 +-
40
 1 file changed, 1 insertion(+), 1 deletion(-)
41
​
42
diff --git a/CMakeLists.txt b/CMakeLists.txt
43
index 61689b1..2c9c61a 100644
44
--- a/CMakeLists.txt
45
+++ b/CMakeLists.txt
46
@@ -1,6 +1,6 @@
47
 cmake_minimum_required(VERSION 2.8.8)
48
 
49
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
50
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
51
 cmake_policy(SET CMP0017 OLD) # Prefer modules in our module directory
52
 
53
 project(FASTD C ASM)
54
-- 
55
2.7.4
56
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.