Lines 4-12
Link Here
|
4 |
# |
4 |
# |
5 |
# Feature: cmake |
5 |
# Feature: cmake |
6 |
# Usage: USES=cmake or USES=cmake:ARGS |
6 |
# Usage: USES=cmake or USES=cmake:ARGS |
7 |
# Valid ARGS: outsource |
7 |
# Valid ARGS: outsource, run, noninja |
8 |
# ARGS description: |
8 |
# ARGS description: |
9 |
# outsource perform an out-of-source build |
9 |
# outsource perform an out-of-source build |
|
|
10 |
# noninja don't use ninja instead of make |
11 |
# run add a runtime dependency on cmake |
10 |
# |
12 |
# |
11 |
# |
13 |
# |
12 |
# Additional variables that affect cmake behaviour: |
14 |
# Additional variables that affect cmake behaviour: |
Lines 14-20
Link Here
|
14 |
# User defined variables: |
16 |
# User defined variables: |
15 |
# CMAKE_NOCOLOR - Disable colour build output |
17 |
# CMAKE_NOCOLOR - Disable colour build output |
16 |
# Default: not set, unless BATCH or PACKAGE_BUILDING is defined |
18 |
# Default: not set, unless BATCH or PACKAGE_BUILDING is defined |
17 |
# CMAKE_NINJA - Use ninja instead of make(1) |
|
|
18 |
# |
19 |
# |
19 |
# Variables for ports: |
20 |
# Variables for ports: |
20 |
# CMAKE_ARGS - Arguments passed to cmake |
21 |
# CMAKE_ARGS - Arguments passed to cmake |
Lines 36-42
Link Here
|
36 |
.if !defined(_INCLUDE_USES_CMAKE_MK) |
37 |
.if !defined(_INCLUDE_USES_CMAKE_MK) |
37 |
_INCLUDE_USES_CMAKE_MK= yes |
38 |
_INCLUDE_USES_CMAKE_MK= yes |
38 |
|
39 |
|
39 |
_valid_ARGS= outsource run |
40 |
_valid_ARGS= outsource run noninja |
40 |
|
41 |
|
41 |
# Sanity check |
42 |
# Sanity check |
42 |
.for arg in ${cmake_ARGS} |
43 |
.for arg in ${cmake_ARGS} |
Lines 91-97
Link Here
|
91 |
CMAKE_ARGS+= -DCMAKE_COLOR_MAKEFILE:BOOL=OFF |
92 |
CMAKE_ARGS+= -DCMAKE_COLOR_MAKEFILE:BOOL=OFF |
92 |
.endif |
93 |
.endif |
93 |
|
94 |
|
94 |
.if defined(CMAKE_NINJA) |
95 |
# By default we use the ninja generator. |
|
|
96 |
# Except, if cmake:run is set (cmake not wanted as generator) |
97 |
# fortran is used, as the ninja-generator does not handle it. |
98 |
.if empty(cmake_ARGS:Mnoninja) && empty(cmake_ARGS:Mrun) && empty(USES:Mfortran) |
95 |
.include "${USESDIR}/ninja.mk" |
99 |
.include "${USESDIR}/ninja.mk" |
96 |
.endif |
100 |
.endif |
97 |
|
101 |
|