File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 99from os import chdir , environ
1010from shutil import rmtree
1111import subprocess
12+ import platform
1213
1314#
1415
@@ -44,7 +45,11 @@ def run_command(command, workingDir):
4445
4546environ ["MP_PERFETTO_SHOULD_BE_ON" ] = "FALSE"
4647
47- run_command (command = f"cmake -B { BUILD_DIR } " ,
48+ # Single-config generators (Unix Makefiles, Ninja) require CMAKE_BUILD_TYPE at configure time
49+ # Multi-config generators (Xcode, Visual Studio) ignore it and use --config at build time
50+ build_type_flag = "" if platform .system () == "Windows" else " -DCMAKE_BUILD_TYPE=Debug"
51+
52+ run_command (command = f"cmake -B { BUILD_DIR } { build_type_flag } " ,
4853 workingDir = REPO_ROOT )
4954
5055run_command (command = f"cmake --build { BUILD_DIR } " ,
@@ -55,7 +60,7 @@ def run_command(command, workingDir):
5560
5661environ ["MP_PERFETTO_SHOULD_BE_ON" ] = "TRUE"
5762
58- run_command (command = f"cmake -B { BUILD_DIR } -D PERFETTO=ON" ,
63+ run_command (command = f"cmake -B { BUILD_DIR } -D PERFETTO=ON{ build_type_flag } " ,
5964 workingDir = REPO_ROOT )
6065
6166run_command (command = f"cmake --build { BUILD_DIR } " ,
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ add_test (NAME "${base_name}.configure"
66 COMMAND "${CMAKE_COMMAND} "
77 -S "${CMAKE_CURRENT_LIST_DIR} "
88 -B "${binary_dir} "
9+ -G "${CMAKE_GENERATOR} "
10+ -D "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} "
911 -D "MELATONIN_PERFETTO_ROOT=${MelatoninPerfetto_SOURCE_DIR} "
1012 -D "FETCHCONTENT_SOURCE_DIR_JUCE=${juce_SOURCE_DIR} "
1113 -D "FETCHCONTENT_SOURCE_DIR_PERFETTO=${perfetto_SOURCE_DIR} " )
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ add_test (NAME "${base_name}.configure"
1717 -S "${CMAKE_CURRENT_LIST_DIR} "
1818 -B "${binary_dir} "
1919 -G "${CMAKE_GENERATOR} "
20+ -D "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} "
2021 -D "MelatoninPerfetto_DIR=${prefix} /${CMAKE_INSTALL_LIBDIR} /cmake/melatonin_perfetto"
2122 -D "FETCHCONTENT_SOURCE_DIR_JUCE=${juce_SOURCE_DIR} "
2223 -D "FETCHCONTENT_SOURCE_DIR_PERFETTO=${perfetto_SOURCE_DIR} " )
You can’t perform that action at this time.
0 commit comments