Skip to content

Instantly share code, notes, and snippets.

@cristianadam
cristianadam / 7zip-benchmark.txt
Created November 4, 2021 10:01
7zip benchmark on a Samsung Galaxy Book Go x86, x86_64 and arm64.
C:\Program Files (Arm)\7-Zip>7z b
7-Zip 21.04 beta (arm64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-11-02
Windows 10.0 22000
ARM64 0 805.D0E cpus:8 128T f:804EB8C1004
LE
1T CPU Freq (MHz): 1931 2549 2550 2493 2488 2549 2545
4T CPU Freq (MHz): 346% 1903 354% 1952
@cristianadam
cristianadam / qt5.15.2-qtdeclarative.patch
Created August 18, 2021 14:02
Qt 5.15.2 Declarative patch to build with LLVM MinGW.
diff -Naur old/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp new/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
--- old/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp 2020-10-27 09:02:12.000000000 +0100
+++ new/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp 2021-06-17 18:41:00.815070000 +0200
@@ -37,6 +37,7 @@
**
****************************************************************************/
+#include <initguid.h>
#include "qsgd3d12engine_p.h"
#include "qsgd3d12engine_p_p.h"
@cristianadam
cristianadam / configure-qt.cmake
Last active May 4, 2021 13:30
Script that builds Qt6. Run as: cmake -P configure-qt.cmake msvc "qtbase;qtdeclarative;qttools" and so on.
if (CMAKE_ARGC LESS 4)
message("Usage cmake -P " ${CMAKE_ARGV2} " <platform e.g. mingw/msvc> <module;list>")
return()
endif()
if (CMAKE_ARGV3 STREQUAL "clang")
set(ENV{CC} clang)
set(ENV{CXX} clang++)
endif()
@cristianadam
cristianadam / configure-small.cmake
Last active April 5, 2022 10:21
Qt Creator CMake configuration for a small build
if (CMAKE_ARGC LESS 4)
message("Usage cmake -P " ${CMAKE_ARGV2} " <platform e.g. mingw/msvc>")
return()
endif()
if (CMAKE_ARGV3 STREQUAL "mingw")
set(QT_PLATFORM mingw_64)
elseif(CMAKE_ARGV3 STREQUAL "msvc")
set(QT_PLATFORM msvc2019_64)
endif()
@cristianadam
cristianadam / PreLoad.cmake
Created December 15, 2020 11:51
PreLoad.cmake to add to your sources so that CMake would create fileApi JSON files for your IDE's CMake project loading
foreach(file cache-v2 cmakeFiles-v1 codemodel-v2)
file(WRITE "${CMAKE_BINARY_DIR}/.cmake/api/v1/query/${file}" "")
endforeach()
@cristianadam
cristianadam / download_qt5.cmake
Created October 30, 2020 10:31
CMake script to download qt5. Just need to run `cmake -P download_qt5.cmake`. Tested on Windows, Linux, macOS. For Mingw use `cmake -P download_qt5.cmake mingw`
set(qt_version "5.15.1")
string(REPLACE "." "" qt_version_dotless "${qt_version}")
if (WIN32)
set(url_os "windows_x86")
if (CMAKE_ARG_3 STREQUAL "mingw")
set(qt_package_arch_suffix "win64_mingw81")
set(qt_dir_prefix "${qt_version}/mingw81_64")
set(qt_package_suffix "-Windows-Windows_10-Mingw-Windows-Windows_10-X86_64")
else()
@cristianadam
cristianadam / download_qt6.cmake
Last active August 2, 2024 02:14
CMake script to download qt6 snapshots and examples. Just need to run cmake -P download_qt6.cmake. Tested on Windows, Linux, macOS.
set(qt_version 6.4.2)
string(REPLACE "." "" qt_version_dotless "${qt_version}")
if (WIN32)
set(url_os "windows_x86")
set(qt_package_arch_suffix "win64_msvc2019_64")
set(qt_dir_prefix "${qt_version}/msvc2019_64")
set(qt_package_suffix "-Windows-Windows_10_21H2-MSVC2019-Windows-Windows_10_21H2-X86_64")
elseif(APPLE)
set(url_os "mac_x64")
@cristianadam
cristianadam / macOS-on-VirtualBox.md
Last active October 12, 2024 09:30
Push-button installer of macOS on VirtualBox
@cristianadam
cristianadam / ccache-master-clang9-include_mtime.log
Created July 26, 2020 17:48
ccache master running with a CMake project having precompiled headers and Clang-Mingw 9 (include_mtime)
[.696641 8612 ] === CCACHE master.1cbaa89d STARTED =========================================
[.696641 8612 ] failed to rename C:/Projects/github/ccache-test/.ccache/stats to C:/Projects/github/ccache-test/.ccache/stats.ccache.rm.tmp: The system cannot find the file specified.
(2)
[.697640 8612 ] Unlink C:/Projects/github/ccache-test/.ccache/stats via C:/Projects/github/ccache-test/.ccache/stats.ccache.rm.tmp
[.697640 8612 ] Unlink failed: Invalid argument
[.765881 19292] === CCACHE master.1cbaa89d STARTED =========================================
[.765881 19292] Config: (environment) base_dir = C:/Projects/github/ccache-test
[.765881 19292] Config: (environment) cache_dir = C:/Projects/github/ccache-test/.ccache
[.765881 19292] Config: (default) cache_dir_levels = 2
@cristianadam
cristianadam / ccache-master-clang9.log
Created July 26, 2020 17:46
ccache master running with a CMake project having precompiled headers and Clang-Mingw 9
[.942520 16720] === CCACHE master.1cbaa89d STARTED =========================================
[.943504 16720] failed to rename C:/Projects/github/ccache-test/.ccache/stats to C:/Projects/github/ccache-test/.ccache/stats.ccache.rm.tmp: The system cannot find the file specified.
(2)
[.943504 16720] Unlink C:/Projects/github/ccache-test/.ccache/stats via C:/Projects/github/ccache-test/.ccache/stats.ccache.rm.tmp
[.943504 16720] Unlink failed: Invalid argument
[.011564 6596 ] === CCACHE master.1cbaa89d STARTED =========================================
[.011564 6596 ] Config: (environment) base_dir = C:/Projects/github/ccache-test
[.011564 6596 ] Config: (environment) cache_dir = C:/Projects/github/ccache-test/.ccache
[.011564 6596 ] Config: (default) cache_dir_levels = 2