Skip to content

Commit e4351ed

Browse files
committed
[cmake] Clarify variable usage through its name.
1 parent 44cea1a commit e4351ed

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CMakeLists.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ include(build_tools/cmake/cg_filegroup.cmake)
4444
include(build_tools/cmake/grpc.cmake)
4545
include(build_tools/cmake/protobuf.cmake)
4646

47-
set(COMPILER_GYM_PYTHONPATH "$ENV{PYTHONPATH}"
47+
# Set up the build Python path.
48+
set(COMPILER_GYM_BUILD_PYTHONPATH "$ENV{PYTHONPATH}"
4849
CACHE STRING "PYTHONPATH environment variable during build step."
4950
)
50-
if(COMPILER_GYM_PYTHONPATH)
51-
string(PREPEND COMPILER_GYM_PYTHONPATH ":")
51+
if(COMPILER_GYM_BUILD_PYTHONPATH)
52+
string(PREPEND COMPILER_GYM_BUILD_PYTHONPATH ":")
5253
endif()
53-
string(PREPEND COMPILER_GYM_PYTHONPATH "${CMAKE_BINARY_DIR}")
54+
string(PREPEND COMPILER_GYM_BUILD_PYTHONPATH "${CMAKE_BINARY_DIR}")
5455
include(build_tools/cmake/set_command_pythonpath.cmake)
5556

5657
set(DEFAULT_CMAKE_BUILD_TYPE "Release")

build_tools/cmake/set_command_pythonpath.cmake

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
#
33
# This source code is licensed under the MIT license found in the
44
# LICENSE file in the root directory of this source tree.
5-
65
include(CMakeParseArguments)
76

87
function(set_command_pythonpath)
98
cmake_parse_arguments(_ARG "" "COMMAND;RESULT" "" ${ARGN})
109

11-
if(COMPILER_GYM_PYTHONPATH)
10+
if(COMPILER_GYM_BUILD_PYTHONPATH)
1211
set(${_ARG_RESULT}
13-
"\"${CMAKE_COMMAND}\" -E env \"PYTHONPATH=${COMPILER_GYM_PYTHONPATH}\" ${_ARG_COMMAND}"
12+
"\"${CMAKE_COMMAND}\" -E env \"PYTHONPATH=${COMPILER_GYM_BUILD_PYTHONPATH}\" ${_ARG_COMMAND}"
1413
PARENT_SCOPE
1514
)
1615
else()

0 commit comments

Comments
 (0)