mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2025-02-10 00:35:41 +08:00
measure compile time on mac
This commit is contained in:
parent
1442f09d6b
commit
16bc5aa542
@ -1,6 +1,10 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
use Time::HiRes qw(gettimeofday tv_interval);
|
||||||
|
|
||||||
|
# Start time
|
||||||
|
my $start_time = [gettimeofday];
|
||||||
|
|
||||||
# Define the modules to skip
|
# Define the modules to skip
|
||||||
my @skipped_modules = qw(
|
my @skipped_modules = qw(
|
||||||
@ -88,6 +92,15 @@ run_command("../configure $skip_modules_string -no-framework -- $build_archs $bu
|
|||||||
print "Building Qt6...\n";
|
print "Building Qt6...\n";
|
||||||
run_command("cmake --build . --parallel");
|
run_command("cmake --build . --parallel");
|
||||||
|
|
||||||
|
# End time
|
||||||
|
my $end_time = [gettimeofday];
|
||||||
|
my $elapsed = tv_interval($start_time, $end_time);
|
||||||
|
# Convert elapsed time to mm:ss format
|
||||||
|
my $minutes = int($elapsed / 60);
|
||||||
|
my $seconds = $elapsed % 60;
|
||||||
|
# Format the output
|
||||||
|
printf("Compilation time: %02d:%02d\n", $minutes, $seconds);
|
||||||
|
|
||||||
# Install Qt6 with sudo
|
# Install Qt6 with sudo
|
||||||
print "Installing Qt6 with elevated privileges...\n";
|
print "Installing Qt6 with elevated privileges...\n";
|
||||||
run_command_with_sudo("cmake --install .");
|
run_command_with_sudo("cmake --install .");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user