@@ -19,8 +19,8 @@ def main():
1919 print ("Parsing command line arguments.." )
2020 parser = argparse .ArgumentParser (description = "Processing arguments for CMake build configuration." )
2121 parser .add_argument ("-b" , "--buildtype" , type = str , choices = ["debug" , "release" , "size" , "reldeb" ],
22- help = "CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug "
23- "Information)" , default = "debug" )
22+ help = "CMake build type. Valid arguments: debug, release, size, reldeb "
23+ "(Release with Debug Information)" , default = "debug" )
2424 parser .add_argument ("-l" , "--builddir" , type = str , help = "Specify build directory." )
2525 parser .add_argument ("-g" , "--generator" , type = str , help = "CMake Generator" )
2626 parser .add_argument ("-p" , "--prefix" , type = str , help = "RTEMS prefix" )
@@ -60,7 +60,14 @@ def main():
6060 if args .rtems_bsp is not None :
6161 cmake_rtems_bsp = f"-DRTEMS_BSP=\" { args .rtems_bsp } \" "
6262 else :
63- cmake_rtems_bsp = ""
63+ print ("Error: RTEMS BSP has to be specified!" )
64+ sys .exit (1 )
65+
66+ if args .prefix is not None :
67+ rtems_prefix = args .prefix
68+ else :
69+ print ("Error: RTEMS prefix has to be specified!" )
70+ sys .exit (1 )
6471
6572 define_string = ""
6673 if args .defines is not None :
@@ -88,7 +95,7 @@ def main():
8895 os .chdir (build_folder )
8996
9097 cmake_command = f"cmake { generator_cmake_arg } -DCMAKE_BUILD_TYPE=\" { cmake_build_type } \" " \
91- f"{ cmake_rtems_bsp } { define_string } { source_location } "
98+ f"{ cmake_rtems_bsp } { rtems_prefix } { define_string } { source_location } "
9299 # Remove redundant spaces
93100 cmake_command = ' ' .join (cmake_command .split ())
94101 print ("Running CMake command: " )
0 commit comments