Skip to content

Commit 2b3ce06

Browse files
committed
added new helper script, bugfix
1 parent 2646044 commit 2b3ce06

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

RTEMSCompilerConfig.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ option(RTEMS_VERBOSE "Verbose output for the RTEMS CMake support" FALSE)
88
set(RTEMS_PREFIX ${RTEMS_PREFIX} CACHE FILEPATH "RTEMS prefix")
99
set(RTEMS_BSP ${RTEMS_BSP} CACHE STRING "RTEMS BSP")
1010

11-
if(NOT RTEMS_VERSION)
12-
if(NOT ENV{RTEMS_VERSION})
11+
if(NOT DEFINED RTEMS_VERSION)
12+
if(NOT DEFINED ENV{RTEMS_VERSION})
1313
message(WARNING
1414
"No RTEMS verson specified via argument or in"
1515
" environment variables!"

cmake_build_config.py

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def main():
6464
sys.exit(1)
6565

6666
if args.prefix is not None:
67-
rtems_prefix = args.prefix
67+
rtems_prefix_arg = f"-DRTEMS_PREFIX=\"{args.prefix}\""
6868
else:
6969
print("Error: RTEMS prefix has to be specified!")
7070
sys.exit(1)
@@ -95,7 +95,7 @@ def main():
9595
os.chdir(build_folder)
9696

9797
cmake_command = f"cmake {generator_cmake_arg} -DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" " \
98-
f"{cmake_rtems_bsp} {rtems_prefix} {define_string} {source_location}"
98+
f"{cmake_rtems_bsp} {rtems_prefix_arg} {define_string} {source_location}"
9999
# Remove redundant spaces
100100
cmake_command = ' '.join(cmake_command.split())
101101
print("Running CMake command: ")

0 commit comments

Comments
 (0)