Skip to content

Commit 5bfe95a

Browse files
author
ajohns
committed
-minor code change, comment changes
1 parent 4d5dacc commit 5bfe95a

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
lines changed

src/rez/utils/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
# Update this value to version up Rez. Do not place anything else in this file.
4-
_rez_version = "2.20.1"
4+
_rez_version = "2.21.0"
55

66
try:
77
from rez.vendor.version.version import Version

src/rezplugins/build_system/cmake.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@ class CMakeBuildSystem(BuildSystem):
3737
if 0, just a build is occurring.
3838
"""
3939

40-
build_systems = {'eclipse': "Eclipse CDT4 - Unix Makefiles",
41-
'codeblocks': "CodeBlocks - Unix Makefiles",
42-
'make': "Unix Makefiles",
43-
'nmake': "NMake Makefiles",
44-
'mingw': "MinGW Makefiles",
45-
'xcode': "Xcode"}
40+
build_systems = {
41+
'eclipse': "Eclipse CDT4 - Unix Makefiles",
42+
'codeblocks': "CodeBlocks - Unix Makefiles",
43+
'make': "Unix Makefiles",
44+
'nmake': "NMake Makefiles",
45+
'mingw': "MinGW Makefiles",
46+
'xcode': "Xcode"
47+
}
4648

4749
build_targets = ["Debug", "Release", "RelWithDebInfo"]
4850

@@ -51,7 +53,8 @@ class CMakeBuildSystem(BuildSystem):
5153
"build_system": Or(*build_systems.keys()),
5254
"cmake_args": [basestring],
5355
"cmake_binary": Or(None, basestring),
54-
"make_binary": Or(None, basestring)}
56+
"make_binary": Or(None, basestring)
57+
}
5558

5659
@classmethod
5760
def name(cls):
@@ -177,19 +180,19 @@ def _pr(s):
177180

178181
# assemble make command
179182
make_binary = self.settings.make_binary
180-
if self.settings.make_binary:
181-
cmd = [self.settings.make_binary]
182-
elif self.cmake_build_system == 'mingw':
183-
cmd = ["mingw32-make"]
184-
elif self.cmake_build_system == 'nmake':
185-
make_binary = 'nmake'
186-
cmd = ["nmake"]
187-
else:
188-
cmd = ["make"]
189-
cmd += (self.child_build_args or [])
183+
184+
if not make_binary:
185+
if self.cmake_build_system == "mingw":
186+
make_binary = "mingw32-make"
187+
elif self.cmake_build_system == "nmake":
188+
make_binary = "nmake"
189+
else:
190+
make_binary = "make"
191+
192+
cmd = [make_binary] + (self.child_build_args or [])
190193

191194
# nmake has no -j
192-
if make_binary != 'nmake':
195+
if make_binary != "nmake":
193196
if not any(x.startswith("-j") for x in (self.child_build_args or [])):
194197
n = variant.config.build_thread_count
195198
cmd.append("-j%d" % n)

src/rezplugins/build_system/rezconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# TODO remove this file in PR for https://github.com/nerdvegas/rez/issues/525,
2+
# it is unused
3+
14
cmake:
25
# The name of the CMake build system to use, valid options are
36
# eclipse, make, xcode and codeblocks.

src/rezplugins/build_system/rezconfig.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build_target": "Release",
1212

1313
# A list of default arguments to be passed to the cmake binary.
14-
"cmake_args" : [
14+
"cmake_args": [
1515
'-Wno-dev',
1616
'-DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE',
1717
'-D_ECLIPSE_VERSION=4.3',
@@ -21,7 +21,8 @@
2121
# Optionally specify an explicit cmake executable to use for building.
2222
"cmake_binary": None,
2323

24-
# Optionally specify an explicit make executable to use for building.
24+
# Optionally specify an explicit make executable to use for building. If
25+
# not specified, this is determined automatically based on `build_system`.
2526
"make_binary": None,
2627

2728
# If True, install pyc files when the 'rez_install_python' macro is used.

0 commit comments

Comments
 (0)