build: fix build profile configuration in ns3
This commit is contained in:
10
ns3
10
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")))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user