Skip to contentSkip to conversation

Support a list of "cmake" candidates

PATCH New Carlos Santos 2 participants 13 messages May 5, 2017 – May 6, 2017

lore
Share & tools
lore
#0 lore raw

cover Support a list of "cmake" candidates

On CentOS 7 the "cmake" package installs cmake 2.8.12, which is too old for us but the "cmake3" package (from EPEL) provides cmake 3.6.3, which is good enough.

This series adds support to a list of candidates to be checked instead of resorting to host-cmake if "cmake" does not exist or is too old.

Patch 1 modifies check-host-cmake.sh to support a list of candidates and the minimal version, keeping compatibility with the previous syntax.

Patch 2 Introduces the BR2_CMAKE_CANDIDATES in check-host-cmake.mk, still keeping compatible with the previous behavior.

Patch 3 adds "cmake3" to the list of cmake candidates.

Carlos Santos (3):
core: allow check-host-cmake.sh to check several candidates
core: allow having a list of "cmake" candidates
core: add "cmake3" to the list of cmake candidates

 support/dependencies/check-host-cmake.mk |  7 ++--
 support/dependencies/check-host-cmake.sh | 66 ++++++++++++++++----------------
 2 files changed, 38 insertions(+), 35 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/3 core: allow check-host-cmake.sh to check several candidates

On CentOS 7 the "cmake" package installs cmake 2.8.12, which is too old for us but the "cmake3" package (from EPEL) provides cmake 3.6.3, which is good enough.

This change allows passing a list of candidates and the minimal version to check-host-cmake.sh. Examples (on CentOS 7):

    $ sh support/dependencies/check-host-cmake.sh cmake cmake3 2.8
    /usr/bin/cmake
    $ sh support/dependencies/check-host-cmake.sh cmake cmake3 3.1
    /usr/bin/cmake3
    $ sh support/dependencies/check-host-cmake.sh cmake cmake3 3.8
---
 support/dependencies/check-host-cmake.sh | 66 ++++++++++++++++----------------
 1 file changed, 34 insertions(+), 32 deletions(-)
support/dependencies/check-host-cmake.sh +34 -32
index 9b63b06..09ae8cc 100755
@@ -1,39 +1,41 @@
 #!/bin/sh
 
-candidate="${1}"
-version_min="${2}"
+eval 'version_min="${'${#}'}"'
 
 major_min="${version_min%.*}"
 minor_min="${version_min#*.}"
 
-cmake=`which ${candidate}`
-if [ ! -x "${cmake}" ]; then
-    # echo nothing: no suitable cmake found
-    exit 1
-fi
-
-# Extract version X.Y from versions in the form X.Y or X.Y.Z
-# with X, Y and Z numbers with one or more digits each, e.g.
-#   3.2     -> 3.2
-#   3.2.3   -> 3.2
-#   3.2.42  -> 3.2
-#   3.10    -> 3.10
-#   3.10.4  -> 3.10
-#   3.10.42 -> 3.10
-version="$(${cmake} --version \
-           |sed -r -e '/.* ([[:digit:]]+\.[[:digit:]]+).*$/!d;' \
-                   -e 's//\1/'
-          )"
-major="${version%.*}"
-minor="${version#*.}"
-
-if [ ${major} -gt ${major_min} ]; then
-    echo "${cmake}"
-else
-    if [ ${major} -eq ${major_min} -a ${minor} -ge ${minor_min} ]; then
-        echo "${cmake}"
-    else
-        # echo nothing: no suitable cmake found
-        exit 1
+while [ $# -gt 1 ]; do
+
+    cmake=`which "${1}" 2>/dev/null`
+
+    if [ -x "${cmake}" ]; then
+        # Extract version X.Y from versions in the form X.Y or X.Y.Z
+        # with X, Y and Z numbers with one or more digits each, e.g.
+        #   3.2     -> 3.2
+        #   3.2.3   -> 3.2
+        #   3.2.42  -> 3.2
+        #   3.10    -> 3.10
+        #   3.10.4  -> 3.10
+        #   3.10.42 -> 3.10
+        version="$(${cmake} --version \
+                   |sed -r -e '/.* ([[:digit:]]+\.[[:digit:]]+).*$/!d;' \
+                           -e 's//\1/'
+                  )"
+        major="${version%.*}"
+        minor="${version#*.}"
+
+        if [ ${major} -gt ${major_min} ]; then
+            echo "${cmake}"
+            exit
+        elif [ ${major} -eq ${major_min} -a ${minor} -ge ${minor_min} ]; then
+            echo "${cmake}"
+            exit
+        fi
     fi
-fi
+
+    shift
+done
+
+# echo nothing: no suitable cmake found
+exit 1
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 1/3 core: allow check-host-cmake.sh to check several candidates

Carlos, All,

On 2017-05-05 17:30 -0300, Carlos Santos spake thusly:

Quoted 25 lines

On CentOS 7 the "cmake" package installs cmake 2.8.12, which is too old for us but the "cmake3" package (from EPEL) provides cmake 3.6.3, which is good enough.

This change allows passing a list of candidates and the minimal version to check-host-cmake.sh. Examples (on CentOS 7):

    $ sh support/dependencies/check-host-cmake.sh cmake cmake3 2.8
    /usr/bin/cmake
    $ sh support/dependencies/check-host-cmake.sh cmake cmake3 3.1
    /usr/bin/cmake3
    $ sh support/dependencies/check-host-cmake.sh cmake cmake3 3.8
---
 support/dependencies/check-host-cmake.sh | 66 ++++++++++++++++----------------
 1 file changed, 34 insertions(+), 32 deletions(-)
support/dependencies/check-host-cmake.sh +0 -0
index 9b63b06..09ae8cc 100755

support/dependencies/check-host-cmake.sh line 3

Quoted 5 lines
support/dependencies/check-host-cmake.sh +1 -2
@@ -1,39 +1,41 @@
 #!/bin/sh
 
-candidate="${1}"
-version_min="${2}"
+eval 'version_min="${'${#}'}"'

It took me a moment to understand what this was doing (and I am known for being a shell fanboy!).

Just revert the order options are passed: version first, then candidates. This will allow you to get rid of this weird construct.

version_min="${1}"
shift # Keep only candidates

So that you can do...

support/dependencies/check-host-cmake.sh line 6

Quoted 2 lines
support/dependencies/check-host-cmake.sh +0 -0
 major_min="${version_min%.*}"
 minor_min="${version_min#*.}"

[--SNIP--]

support/dependencies/check-host-cmake.sh line 10

Quoted 2 lines
support/dependencies/check-host-cmake.sh +2 -0
+while [ $# -gt 1 ]; do
+    cmake=`which "${1}" 2>/dev/null`

for cmake; do
cmake=which "${cmake}" 2>/dev/null

support/dependencies/check-host-cmake.sh line 9

Quoted 2 lines
support/dependencies/check-host-cmake.sh +2 -0
+
+    if [ -x "${cmake}" ]; then

Please use an early cut:

        [ -x "${cmake}" ] || continue

which allows you to gain a indentation level below.

Quoted 20 lines
support/dependencies/check-host-cmake.sh +20 -0
+        # Extract version X.Y from versions in the form X.Y or X.Y.Z
+        # with X, Y and Z numbers with one or more digits each, e.g.
+        #   3.2     -> 3.2
+        #   3.2.3   -> 3.2
+        #   3.2.42  -> 3.2
+        #   3.10    -> 3.10
+        #   3.10.4  -> 3.10
+        #   3.10.42 -> 3.10
+        version="$(${cmake} --version \
+                   |sed -r -e '/.* ([[:digit:]]+\.[[:digit:]]+).*$/!d;' \
+                           -e 's//\1/'
+                  )"
+        major="${version%.*}"
+        minor="${version#*.}"
+
+        if [ ${major} -gt ${major_min} ]; then
+            echo "${cmake}"
+            exit
+        elif [ ${major} -eq ${major_min} -a ${minor} -ge ${minor_min} ]; then
+            echo "${cmake}"

support/dependencies/check-host-cmake.sh line 41

Quoted 10 lines
support/dependencies/check-host-cmake.sh +8 -1
+            exit
+        fi
     fi
-fi
+
+    shift
+done
+
+# echo nothing: no suitable cmake found
+exit 1

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/3 core: allow check-host-cmake.sh to check several candidates

Quoted 17 lines

From: "Yann E. MORIN" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Friday, May 5, 2017 6:07:03 PM
Subject: Re: [Buildroot] [PATCH 1/3] core: allow check-host-cmake.sh to check several candidates

support/dependencies/check-host-cmake.sh line 3

Quoted 8 lines
support/dependencies/check-host-cmake.sh +1 -2
@@ -1,39 +1,41 @@
 #!/bin/sh
 
-candidate="${1}"
-version_min="${2}"
+eval 'version_min="${'${#}'}"'

It took me a moment to understand what this was doing (and I am known for being a shell fanboy!).

Quoted 5 lines

Just revert the order options are passed: version first, then candidates. This will allow you to get rid of this weird construct.

   version_min="${1}"
   shift # Keep only candidates

I did it that way because all invocations of the "suitable-host-package" macro pass the candidate name as the first argument to the script but I must admit that the script lost some readability.

Quoted 12 lines

So that you can do...

support/dependencies/check-host-cmake.sh line 6

Quoted 2 lines
support/dependencies/check-host-cmake.sh +0 -0
 major_min="${version_min%.*}"
 minor_min="${version_min#*.}"

[--SNIP--]

support/dependencies/check-host-cmake.sh line 10

Quoted 2 lines
support/dependencies/check-host-cmake.sh +2 -0
+while [ $# -gt 1 ]; do
+    cmake=`which "${1}" 2>/dev/null`
   for cmake; do
       cmake=`which "${cmake}" 2>/dev/null`
Quoted 8 lines

support/dependencies/check-host-cmake.sh line 9

Quoted 2 lines
support/dependencies/check-host-cmake.sh +2 -0
+
+    if [ -x "${cmake}" ]; then

Please use an early cut:

       [ -x "${cmake}" ] || continue

which allows you to gain a indentation level below.

Ok.

Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
#4 lore raw

PATCH 1/3 core: allow check-host-cmake.sh to check several candidates

Quoted 27 lines

From: "Carlos Santos" <[email protected]>
To: "Yann E. MORIN" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Friday, May 5, 2017 7:34:46 PM
Subject: Re: [Buildroot] [PATCH 1/3] core: allow check-host-cmake.sh to check several candidates

Quoted 21 lines

From: "Yann E. MORIN" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Friday, May 5, 2017 6:07:03 PM
Subject: Re: [Buildroot] [PATCH 1/3] core: allow check-host-cmake.sh to check several candidates

support/dependencies/check-host-cmake.sh line 3

Quoted 8 lines
support/dependencies/check-host-cmake.sh +1 -2
@@ -1,39 +1,41 @@
 #!/bin/sh
 
-candidate="${1}"
-version_min="${2}"
+eval 'version_min="${'${#}'}"'

It took me a moment to understand what this was doing (and I am known for being a shell fanboy!).

Just revert the order options are passed: version first, then candidates. This will allow you to get rid of this weird construct.

Quoted 6 lines
Quoted 2 lines
   version_min="${1}"
   shift # Keep only candidates

I did it that way because all invocations of the "suitable-host-package" macro pass the candidate name as the first argument to the script but I must admit that the script lost some readability.

Also, doing it as you suggest requires modifying check-host-cmake.mk in the same patch to change the argument order, which I'd prefer to avoid.

Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
#5 lore raw

PATCH 1/3 core: allow check-host-cmake.sh to check several candidates

Carlos, All,

On 2017-05-05 20:19 -0300, Carlos Santos spake thusly:

Quoted 30 lines
Quoted 30 lines

From: "Carlos Santos" <[email protected]>
To: "Yann E. MORIN" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Friday, May 5, 2017 7:34:46 PM
Subject: Re: [Buildroot] [PATCH 1/3] core: allow check-host-cmake.sh to check several candidates

Quoted 23 lines

From: "Yann E. MORIN" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Friday, May 5, 2017 6:07:03 PM
Subject: Re: [Buildroot] [PATCH 1/3] core: allow check-host-cmake.sh to check several candidates

support/dependencies/check-host-cmake.sh line 3

Quoted 8 lines
support/dependencies/check-host-cmake.sh +1 -2
@@ -1,39 +1,41 @@
 #!/bin/sh
 
-candidate="${1}"
-version_min="${2}"
+eval 'version_min="${'${#}'}"'

It took me a moment to understand what this was doing (and I am known for being a shell fanboy!).

Just revert the order options are passed: version first, then candidates. This will allow you to get rid of this weird construct.

   version_min="${1}"
   shift # Keep only candidates
Quoted 7 lines
Quoted 3 lines

I did it that way because all invocations of the "suitable-host-package" macro pass the candidate name as the first argument to the script but I must admit that the script lost some readability.

Also, doing it as you suggest requires modifying check-host-cmake.mk in the same patch to change the argument order, which I'd prefer to avoid.

Well, yes you'd have to do that, and I think it is totally aceptable that you change the order of arguments.

And not all checkers already behave the same anyway. The asciidoc one just ignores its first argument and is passed none; the lzip one only takes a candidate and no version; ditto the tar one or the xzcat one. So in fact, the cmake one is the only one to expect a version on its command line.

So yes, re-ordering the arguments is totally acceptable, and, as I wrote, make for a simpler code.

Regards,
Yann E. MORIN.

Quoted 5 lines
Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 2/3 core: allow having a list of "cmake" candidates

In reply to Carlos Santos

Add the BR2_CMAKE_CANDIDATES variable, containing a list of candidates to check and use as BR2_CMAKE, if possible.

This allows using "cmake3" on CentOS 7, whose default cmake corresponds to version 2.8.12. Example:

    $ make BR2_CMAKE_CANDIDATES="cmake cmake3"
---
 support/dependencies/check-host-cmake.mk | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
support/dependencies/check-host-cmake.mk +4 -3
index 8002278..42aaee4 100644
@@ -10,9 +10,10 @@
 #
 BR2_CMAKE_VERSION_MIN = 3.1
 
-BR2_CMAKE ?= cmake
-ifeq ($(call suitable-host-package,cmake,\
-	$(BR2_CMAKE) $(BR2_CMAKE_VERSION_MIN)),)
+BR2_CMAKE_CANDIDATES ?= cmake
+BR2_CMAKE ?= $(call suitable-host-package,cmake,\
+	$(BR2_CMAKE_CANDIDATES) $(BR2_CMAKE_VERSION_MIN))
+ifeq ($(BR2_CMAKE),)
 BR2_CMAKE = $(HOST_DIR)/usr/bin/cmake
 BR2_CMAKE_HOST_DEPENDENCY = host-cmake
 endif
Signature · 1 line
1.8.3.1
#7 lore raw

PATCH 2/3 core: allow having a list of "cmake" candidates

Carlos, All,

On 2017-05-05 17:30 -0300, Carlos Santos spake thusly:

Quoted 18 lines

Add the BR2_CMAKE_CANDIDATES variable, containing a list of candidates to check and use as BR2_CMAKE, if possible.

This allows using "cmake3" on CentOS 7, whose default cmake corresponds to version 2.8.12. Example:

    $ make BR2_CMAKE_CANDIDATES="cmake cmake3"
---
 support/dependencies/check-host-cmake.mk | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
support/dependencies/check-host-cmake.mk +0 -0
index 8002278..42aaee4 100644

support/dependencies/check-host-cmake.mk line 13

Quoted 7 lines
support/dependencies/check-host-cmake.mk +1 -3
@@ -10,9 +10,10 @@
 #
 BR2_CMAKE_VERSION_MIN = 3.1
 
-BR2_CMAKE ?= cmake
-ifeq ($(call suitable-host-package,cmake,\
-	$(BR2_CMAKE) $(BR2_CMAKE_VERSION_MIN)),)
+BR2_CMAKE_CANDIDATES ?= cmake

Do not rename the variable; keep it named BR2_CMAKE.

It was named as such so that one could do:

    $ make BR2_CMAKE=/path/to/my/cmake3

and we want to keep it as such, so people can override the cmake they want to use.

By the way, I hope you knew you could do that, didn't you? ;-)

Regards,
Yann E. MORIN.

Quoted 13 lines
support/dependencies/check-host-cmake.mk +3 -0
+BR2_CMAKE ?= $(call suitable-host-package,cmake,\
+	$(BR2_CMAKE_CANDIDATES) $(BR2_CMAKE_VERSION_MIN))
+ifeq ($(BR2_CMAKE),)
 BR2_CMAKE = $(HOST_DIR)/usr/bin/cmake
 BR2_CMAKE_HOST_DEPENDENCY = host-cmake
 endif
Signature · 6 lines
1.8.3.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH 2/3 core: allow having a list of "cmake" candidates

Quoted 16 lines

From: "Yann E. MORIN" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Friday, May 5, 2017 6:09:28 PM
Subject: Re: [Buildroot] [PATCH 2/3] core: allow having a list of "cmake" candidates

support/dependencies/check-host-cmake.mk line 13

Quoted 8 lines
support/dependencies/check-host-cmake.mk +1 -3
@@ -10,9 +10,10 @@
 #
 BR2_CMAKE_VERSION_MIN = 3.1
 
-BR2_CMAKE ?= cmake
-ifeq ($(call suitable-host-package,cmake,\
-	$(BR2_CMAKE) $(BR2_CMAKE_VERSION_MIN)),)
+BR2_CMAKE_CANDIDATES ?= cmake

Do not rename the variable; keep it named BR2_CMAKE.

Quoted 8 lines

It was named as such so that one could do:

   $ make BR2_CMAKE=/path/to/my/cmake3

and we want to keep it as such, so people can override the cmake they want to use.

By the way, I hope you knew you could do that, didn't you? ;-)

I did not rename the variable. It is still BR2_CMAKE and you still can pass it in the command line (yes, I knew).

Quoted 1 line

support/dependencies/check-host-cmake.mk line 14

Quoted 1 line
support/dependencies/check-host-cmake.mk +1 -0
+BR2_CMAKE ?= $(call suitable-host-package,cmake,\
    ^^^^^^^^^^^^^
Quoted 7 lines
Quoted 7 lines
support/dependencies/check-host-cmake.mk +2 -1
+	$(BR2_CMAKE_CANDIDATES) $(BR2_CMAKE_VERSION_MIN))
+ifeq ($(BR2_CMAKE),)
 BR2_CMAKE = $(HOST_DIR)/usr/bin/cmake
 BR2_CMAKE_HOST_DEPENDENCY = host-cmake
 endif
--

1.8.3.1

Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
#9 lore raw

PATCH 2/3 core: allow having a list of "cmake" candidates

Carlos, All,

On 2017-05-05 19:43 -0300, Carlos Santos spake thusly:

Quoted 23 lines
Quoted 23 lines

From: "Yann E. MORIN" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Friday, May 5, 2017 6:09:28 PM
Subject: Re: [Buildroot] [PATCH 2/3] core: allow having a list of "cmake" candidates

support/dependencies/check-host-cmake.mk line 13

Quoted 8 lines
support/dependencies/check-host-cmake.mk +1 -3
@@ -10,9 +10,10 @@
 #
 BR2_CMAKE_VERSION_MIN = 3.1
 
-BR2_CMAKE ?= cmake
-ifeq ($(call suitable-host-package,cmake,\
-	$(BR2_CMAKE) $(BR2_CMAKE_VERSION_MIN)),)
+BR2_CMAKE_CANDIDATES ?= cmake

Do not rename the variable; keep it named BR2_CMAKE.

It was named as such so that one could do:

   $ make BR2_CMAKE=/path/to/my/cmake3

and we want to keep it as such, so people can override the cmake they want to use.

Quoted 7 lines
Quoted 1 line

By the way, I hope you knew you could do that, didn't you? ;-)

I did not rename the variable. It is still BR2_CMAKE and you still can pass it in the command line (yes, I knew).

Quoted 1 line

support/dependencies/check-host-cmake.mk line 14

Quoted 1 line
support/dependencies/check-host-cmake.mk +1 -0
+BR2_CMAKE ?= $(call suitable-host-package,cmake,\
    ^^^^^^^^^^^^^

Right, I missed the conditional assignment here.

Regards,
Yann E. MORIN.

Quoted 13 lines
Quoted 7 lines
Quoted 7 lines
support/dependencies/check-host-cmake.mk +2 -1
+	$(BR2_CMAKE_CANDIDATES) $(BR2_CMAKE_VERSION_MIN))
+ifeq ($(BR2_CMAKE),)
 BR2_CMAKE = $(HOST_DIR)/usr/bin/cmake
 BR2_CMAKE_HOST_DEPENDENCY = host-cmake
 endif
--

1.8.3.1

Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#10 lore raw

PATCH 3/3 core: add "cmake3" to the list of cmake candidates

In reply to Carlos Santos

This is useful on CentOS 7, whose "cmake" utility corresponds to version 2.8.12, which is too old for Buildroot.

---
 support/dependencies/check-host-cmake.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/dependencies/check-host-cmake.mk +1 -1
index 42aaee4..f2eef8b 100644
@@ -10,7 +10,7 @@
 #
 BR2_CMAKE_VERSION_MIN = 3.1
 
-BR2_CMAKE_CANDIDATES ?= cmake
+BR2_CMAKE_CANDIDATES ?= cmake cmake3
 BR2_CMAKE ?= $(call suitable-host-package,cmake,\
 	$(BR2_CMAKE_CANDIDATES) $(BR2_CMAKE_VERSION_MIN))
 ifeq ($(BR2_CMAKE),)
Signature · 1 line
1.8.3.1
#11 lore raw

PATCH 3/3 core: add "cmake3" to the list of cmake candidates

Carlos, All,

On 2017-05-05 17:30 -0300, Carlos Santos spake thusly:

Quoted 13 lines

This is useful on CentOS 7, whose "cmake" utility corresponds to version 2.8.12, which is too old for Buildroot.

---
 support/dependencies/check-host-cmake.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/dependencies/check-host-cmake.mk +0 -0
index 42aaee4..f2eef8b 100644

support/dependencies/check-host-cmake.mk line 13

Quoted 5 lines
support/dependencies/check-host-cmake.mk +1 -1
@@ -10,7 +10,7 @@
 #
 BR2_CMAKE_VERSION_MIN = 3.1
 
-BR2_CMAKE_CANDIDATES ?= cmake
+BR2_CMAKE_CANDIDATES ?= cmake cmake3

I'm fine with adding this. Except for the variable name, that is. ;-)

Regards,
Yann E. MORIN.

Quoted 10 lines
support/dependencies/check-host-cmake.mk +0 -0
 BR2_CMAKE ?= $(call suitable-host-package,cmake,\
 	$(BR2_CMAKE_CANDIDATES) $(BR2_CMAKE_VERSION_MIN))
 ifeq ($(BR2_CMAKE),)
Signature · 6 lines
1.8.3.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#12 lore raw

PATCH 3/3 core: add "cmake3" to the list of cmake candidates

In reply to Carlos Santos

Carlos, All,

On 2017-05-05 17:30 -0300, Carlos Santos spake thusly:

Quoted 4 lines

This is useful on CentOS 7, whose "cmake" utility corresponds to version 2.8.12, which is too old for Buildroot.

Regards,
Yann E. MORIN.

Quoted 24 lines
---
 support/dependencies/check-host-cmake.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/dependencies/check-host-cmake.mk +1 -1
index 42aaee4..f2eef8b 100644
@@ -10,7 +10,7 @@
 #
 BR2_CMAKE_VERSION_MIN = 3.1
 
-BR2_CMAKE_CANDIDATES ?= cmake
+BR2_CMAKE_CANDIDATES ?= cmake cmake3
 BR2_CMAKE ?= $(call suitable-host-package,cmake,\
 	$(BR2_CMAKE_CANDIDATES) $(BR2_CMAKE_VERSION_MIN))
 ifeq ($(BR2_CMAKE),)
Signature · 6 lines
1.8.3.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'