From 24bf406041b481a515c32342d7866732d76750f6 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Tue, 1 Nov 2022 10:06:37 -0300 Subject: [PATCH] build: fix build profile configuration in ns3 --- ns3 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ns3 b/ns3 index db6d99361..a83212791 100755 --- a/ns3 +++ b/ns3 @@ -552,19 +552,21 @@ def configure_cmake(cmake, args, current_cmake_cache_folder, current_cmake_gener # Build type if args.build_profile is not None: args.build_profile = args.build_profile.lower() - if args.build_profile not in ["debug", "default", "release", "optimized", "minsizerel"]: + if args.build_profile not in ["debug", "default", "release", "optimized", "minsizerel", "relwithdebinfo"]: raise Exception("Unknown build type") else: if args.build_profile == "debug": cmake_args.extend( "-DCMAKE_BUILD_TYPE=debug -DNS3_ASSERT=ON -DNS3_LOG=ON -DNS3_WARNINGS_AS_ERRORS=ON".split()) - elif args.build_profile == "default": + elif args.build_profile in ["default", "relwithdebinfo"]: cmake_args.extend( "-DCMAKE_BUILD_TYPE=default -DNS3_ASSERT=ON -DNS3_LOG=ON -DNS3_WARNINGS_AS_ERRORS=OFF".split()) + elif args.build_profile in ["release", "optimized"]: + cmake_args.extend( + "-DCMAKE_BUILD_TYPE=release -DNS3_ASSERT=OFF -DNS3_LOG=OFF -DNS3_WARNINGS_AS_ERRORS=OFF".split()) else: cmake_args.extend( - f"-DCMAKE_BUILD_TYPE={args.build_profile} -DNS3_ASSERT=OFF -DNS3_LOG=OFF " - f"-DNS3_WARNINGS_AS_ERRORS=OFF".split() + "-DCMAKE_BUILD_TYPE=minsizerel -DNS3_ASSERT=OFF -DNS3_LOG=OFF -DNS3_WARNINGS_AS_ERRORS=OFF".split() ) cmake_args.append("-DNS3_NATIVE_OPTIMIZATIONS=%s" % on_off((args.build_profile == "optimized")))