beagle bone build working
This commit is contained in:
@ -18,18 +18,26 @@ def main():
|
||||
print("-- Python CMake build configurator utility --")
|
||||
|
||||
print("Parsing command line arguments..")
|
||||
parser = argparse.ArgumentParser(description="Processing arguments for CMake build configuration.")
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Processing arguments for CMake build configuration."
|
||||
)
|
||||
parser.add_argument("-o", "--osal", type=str, choices=["freertos", "linux", "rtems", "host"],
|
||||
help="FSFW OSAL. Valid arguments: host, linux, rtems, freertos")
|
||||
parser.add_argument("-b", "--buildtype", type=str, choices=["debug", "release", "size", "reldeb"],
|
||||
help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug "
|
||||
"Information)", default="debug")
|
||||
parser.add_argument(
|
||||
"-b", "--buildtype", type=str, choices=["debug", "release", "size", "reldeb"],
|
||||
help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug "
|
||||
"Information)", default="debug"
|
||||
)
|
||||
parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.")
|
||||
parser.add_argument("-g", "--generator", type=str, help="CMake Generator")
|
||||
parser.add_argument("-d", "--defines",
|
||||
help="Additional custom defines passed to CMake (supply without -D prefix!)",
|
||||
nargs="*", type=str)
|
||||
parser.add_argument("-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine")
|
||||
parser.add_argument(
|
||||
"-d", "--defines",
|
||||
help="Additional custom defines passed to CMake (supply without -D prefix!)",
|
||||
nargs="*", type=str
|
||||
)
|
||||
parser.add_argument(
|
||||
"-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine"
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@ -64,6 +72,12 @@ def main():
|
||||
else:
|
||||
cmake_target_cfg_cmd = ""
|
||||
|
||||
define_string = ""
|
||||
if args.defines is not None:
|
||||
define_list = args.defines[0].split()
|
||||
for define in define_list:
|
||||
define_string += f"-D{define} "
|
||||
|
||||
build_folder = cmake_build_type
|
||||
if args.builddir is not None:
|
||||
build_folder = args.builddir
|
||||
@ -85,7 +99,8 @@ def main():
|
||||
os.chdir(build_folder)
|
||||
|
||||
cmake_command = f"cmake {generator_cmake_arg} -DOS_FSFW=\"{osal}\" " \
|
||||
f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} {source_location}"
|
||||
f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} " \
|
||||
f"{define_string} {source_location}"
|
||||
# Remove redundant spaces
|
||||
cmake_command = ' '.join(cmake_command.split())
|
||||
print("Running CMake command: ")
|
||||
|
Reference in New Issue
Block a user