mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-20 11:47:45 +00:00
Use all available processor cores
This commit is contained in:
parent
5c1b12491d
commit
e700f9f9d2
1 changed files with 23 additions and 21 deletions
|
@ -8,6 +8,8 @@ $LocalDir = "./local"
|
||||||
$BuildDir = "$LocalDir/build"
|
$BuildDir = "$LocalDir/build"
|
||||||
$PrefixDir = (Get-Location).Path + "/prefix"
|
$PrefixDir = (Get-Location).Path + "/prefix"
|
||||||
|
|
||||||
|
$NumCores = [Environment]::ProcessorCount
|
||||||
|
|
||||||
function Configure($Name, $ExtraArgs = "") {
|
function Configure($Name, $ExtraArgs = "") {
|
||||||
$Command = "cmake -B $BuildDir-$Name -DCMAKE_PREFIX_PATH=$PrefixDir -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DCMAKE_BUILD_TYPE=Debug -S $LocalDir/$Name -DCMAKE_INSTALL_PREFIX=$PrefixDir $ExtraArgs"
|
$Command = "cmake -B $BuildDir-$Name -DCMAKE_PREFIX_PATH=$PrefixDir -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DCMAKE_BUILD_TYPE=Debug -S $LocalDir/$Name -DCMAKE_INSTALL_PREFIX=$PrefixDir $ExtraArgs"
|
||||||
Write-Output "Running $Command"
|
Write-Output "Running $Command"
|
||||||
|
@ -58,7 +60,7 @@ CheckCompileResult "zlib"
|
||||||
# Build Extra CMake Modules
|
# Build Extra CMake Modules
|
||||||
Clone "extra-cmake-modules" "https://invent.kde.org/frameworks/extra-cmake-modules.git"
|
Clone "extra-cmake-modules" "https://invent.kde.org/frameworks/extra-cmake-modules.git"
|
||||||
Configure "extra-cmake-modules" "-DBUILD_TESTING=OFF"
|
Configure "extra-cmake-modules" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-extra-cmake-modules" --config Debug --target install
|
cmake --build "$BuildDir-extra-cmake-modules" --config Debug --target install --parallel $NumCores
|
||||||
cmake --install "$BuildDir-extra-cmake-modules" --config Debug
|
cmake --install "$BuildDir-extra-cmake-modules" --config Debug
|
||||||
CheckCompileResult "extra-cmake-modules"
|
CheckCompileResult "extra-cmake-modules"
|
||||||
|
|
||||||
|
@ -68,49 +70,49 @@ Clone "ki18n" "https://invent.kde.org/frameworks/ki18n.git"
|
||||||
Configure "ki18n" "-DBUILD_TESTING=OFF"
|
Configure "ki18n" "-DBUILD_TESTING=OFF"
|
||||||
|
|
||||||
(Get-Content -ReadCount 0 "$BuildDir-ki18n/cmake/build-pofiles.cmake") -replace 'FATAL_ERROR', 'WARNING' | Set-Content "$BuildDir-ki18n/cmake/build-pofiles.cmake"
|
(Get-Content -ReadCount 0 "$BuildDir-ki18n/cmake/build-pofiles.cmake") -replace 'FATAL_ERROR', 'WARNING' | Set-Content "$BuildDir-ki18n/cmake/build-pofiles.cmake"
|
||||||
cmake --build "$BuildDir-ki18n" --config Debug --target install
|
cmake --build "$BuildDir-ki18n" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "ki18n"
|
CheckCompileResult "ki18n"
|
||||||
|
|
||||||
# Build KCoreAddons
|
# Build KCoreAddons
|
||||||
Clone "kcoreaddons" "https://invent.kde.org/frameworks/kcoreaddons.git"
|
Clone "kcoreaddons" "https://invent.kde.org/frameworks/kcoreaddons.git"
|
||||||
Configure "kcoreaddons" "-DBUILD_TESTING=OFF"
|
Configure "kcoreaddons" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kcoreaddons" --config Debug --target install
|
cmake --build "$BuildDir-kcoreaddons" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kcoreaddons"
|
CheckCompileResult "kcoreaddons"
|
||||||
|
|
||||||
# Build KConfig
|
# Build KConfig
|
||||||
Clone "kconfig" "https://invent.kde.org/frameworks/kconfig.git"
|
Clone "kconfig" "https://invent.kde.org/frameworks/kconfig.git"
|
||||||
Configure "kconfig" "-DBUILD_TESTING=OFF"
|
Configure "kconfig" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kconfig" --config Debug --target install
|
cmake --build "$BuildDir-kconfig" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kconfig"
|
CheckCompileResult "kconfig"
|
||||||
|
|
||||||
# Build KArchive
|
# Build KArchive
|
||||||
Clone "karchive" "https://invent.kde.org/frameworks/karchive.git"
|
Clone "karchive" "https://invent.kde.org/frameworks/karchive.git"
|
||||||
Configure "karchive" "-DBUILD_TESTING=OFF" "-DWITH_BZIP2=OFF" "-DWITH_LIBLZMA=OFF" "-DWITH_LIBZSTD=OFF"
|
Configure "karchive" "-DBUILD_TESTING=OFF" "-DWITH_BZIP2=OFF" "-DWITH_LIBLZMA=OFF" "-DWITH_LIBZSTD=OFF"
|
||||||
cmake --build "$BuildDir-karchive" --config Debug --target install
|
cmake --build "$BuildDir-karchive" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "karchive"
|
CheckCompileResult "karchive"
|
||||||
|
|
||||||
# Build KItemViews
|
# Build KItemViews
|
||||||
Clone "kitemviews" "https://invent.kde.org/frameworks/kitemviews.git"
|
Clone "kitemviews" "https://invent.kde.org/frameworks/kitemviews.git"
|
||||||
Configure "kitemviews" "-DBUILD_TESTING=OFF"
|
Configure "kitemviews" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kitemviews" --config Debug --target install
|
cmake --build "$BuildDir-kitemviews" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kitemviews"
|
CheckCompileResult "kitemviews"
|
||||||
|
|
||||||
# Build KCodecs
|
# Build KCodecs
|
||||||
Clone "kcodecs" "https://invent.kde.org/frameworks/kcodecs.git"
|
Clone "kcodecs" "https://invent.kde.org/frameworks/kcodecs.git"
|
||||||
Configure "kcodecs" "-DBUILD_TESTING=OFF"
|
Configure "kcodecs" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kcodecs" --config Debug --target install
|
cmake --build "$BuildDir-kcodecs" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kcodecs"
|
CheckCompileResult "kcodecs"
|
||||||
|
|
||||||
# Build KGuiAddons
|
# Build KGuiAddons
|
||||||
Clone "kguiaddons" "https://invent.kde.org/frameworks/kguiaddons.git"
|
Clone "kguiaddons" "https://invent.kde.org/frameworks/kguiaddons.git"
|
||||||
Configure "kguiaddons" "-DBUILD_TESTING=OFF"
|
Configure "kguiaddons" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kguiaddons" --config Debug --target install
|
cmake --build "$BuildDir-kguiaddons" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kguiaddons"
|
CheckCompileResult "kguiaddons"
|
||||||
|
|
||||||
# Build KWidgetsAddons
|
# Build KWidgetsAddons
|
||||||
Clone "kwidgetsaddons" "https://invent.kde.org/frameworks/kwidgetsaddons.git"
|
Clone "kwidgetsaddons" "https://invent.kde.org/frameworks/kwidgetsaddons.git"
|
||||||
Configure "kwidgetsaddons" "-DBUILD_TESTING=OFF"
|
Configure "kwidgetsaddons" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kwidgetsaddons" --config Debug --target install
|
cmake --build "$BuildDir-kwidgetsaddons" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kwidgetsaddons"
|
CheckCompileResult "kwidgetsaddons"
|
||||||
|
|
||||||
# Build KColorScheme
|
# Build KColorScheme
|
||||||
|
@ -118,61 +120,61 @@ Clone "kcolorscheme" "https://invent.kde.org/frameworks/kcolorscheme.git"
|
||||||
Configure "kcolorscheme" "-DBUILD_TESTING=OFF"
|
Configure "kcolorscheme" "-DBUILD_TESTING=OFF"
|
||||||
# Workaround for Windows
|
# Workaround for Windows
|
||||||
(Get-Content -ReadCount 0 "$PrefixDir/lib/cmake/KF6I18n/build-pofiles.cmake") -replace 'FATAL_ERROR', 'WARNING' | Set-Content "$PrefixDir/lib/cmake/KF6I18n/build-pofiles.cmake"
|
(Get-Content -ReadCount 0 "$PrefixDir/lib/cmake/KF6I18n/build-pofiles.cmake") -replace 'FATAL_ERROR', 'WARNING' | Set-Content "$PrefixDir/lib/cmake/KF6I18n/build-pofiles.cmake"
|
||||||
cmake --build "$BuildDir-kcolorscheme" --config Debug --target install
|
cmake --build "$BuildDir-kcolorscheme" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kcolorscheme"
|
CheckCompileResult "kcolorscheme"
|
||||||
|
|
||||||
# Build KConfigWidgets
|
# Build KConfigWidgets
|
||||||
Clone "kconfigwidgets" "https://invent.kde.org/frameworks/kconfigwidgets.git"
|
Clone "kconfigwidgets" "https://invent.kde.org/frameworks/kconfigwidgets.git"
|
||||||
Configure "kconfigwidgets" "-DBUILD_TESTING=OFF"
|
Configure "kconfigwidgets" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kconfigwidgets" --config Debug --target install
|
cmake --build "$BuildDir-kconfigwidgets" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kconfigwidgets"
|
CheckCompileResult "kconfigwidgets"
|
||||||
|
|
||||||
# Build KIconThemes
|
# Build KIconThemes
|
||||||
Clone "kiconthemes" "https://invent.kde.org/frameworks/kiconthemes.git"
|
Clone "kiconthemes" "https://invent.kde.org/frameworks/kiconthemes.git"
|
||||||
Configure "kiconthemes" "-DBUILD_TESTING=OFF"
|
Configure "kiconthemes" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kiconthemes" --config Debug --target install
|
cmake --build "$BuildDir-kiconthemes" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kiconthemes"
|
CheckCompileResult "kiconthemes"
|
||||||
|
|
||||||
# Build Sonnet
|
# Build Sonnet
|
||||||
Clone "sonnet" "https://invent.kde.org/frameworks/sonnet.git"
|
Clone "sonnet" "https://invent.kde.org/frameworks/sonnet.git"
|
||||||
Configure "sonnet" "-DBUILD_TESTING=OFF"
|
Configure "sonnet" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-sonnet" --config Debug --target install
|
cmake --build "$BuildDir-sonnet" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "sonnet"
|
CheckCompileResult "sonnet"
|
||||||
|
|
||||||
# Build KCompletion
|
# Build KCompletion
|
||||||
Clone "kcompletion" "https://invent.kde.org/frameworks/kcompletion.git"
|
Clone "kcompletion" "https://invent.kde.org/frameworks/kcompletion.git"
|
||||||
Configure "kcompletion" "-DBUILD_TESTING=OFF"
|
Configure "kcompletion" "-DBUILD_TESTING=OFF"
|
||||||
cmake --build "$BuildDir-kcompletion" --config Debug --target install
|
cmake --build "$BuildDir-kcompletion" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kcompletion"
|
CheckCompileResult "kcompletion"
|
||||||
|
|
||||||
# Build KTextWidgets
|
# Build KTextWidgets
|
||||||
Clone "ktextwidgets" "https://invent.kde.org/frameworks/ktextwidgets.git"
|
Clone "ktextwidgets" "https://invent.kde.org/frameworks/ktextwidgets.git"
|
||||||
Configure "ktextwidgets" "-DBUILD_TESTING=OFF" "-DWITH_TEXT_TO_SPEECH=OFF"
|
Configure "ktextwidgets" "-DBUILD_TESTING=OFF" "-DWITH_TEXT_TO_SPEECH=OFF"
|
||||||
cmake --build "$BuildDir-ktextwidgets" --config Debug --target install
|
cmake --build "$BuildDir-ktextwidgets" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "ktextwidgets"
|
CheckCompileResult "ktextwidgets"
|
||||||
|
|
||||||
# Build KXmlGui
|
# Build KXmlGui
|
||||||
Clone "kxmlgui" "https://invent.kde.org/frameworks/kxmlgui.git"
|
Clone "kxmlgui" "https://invent.kde.org/frameworks/kxmlgui.git"
|
||||||
Configure "kxmlgui" "-DBUILD_TESTING=OFF" "-DFORCE_DISABLE_KGLOBALACCEL=ON"
|
Configure "kxmlgui" "-DBUILD_TESTING=OFF" "-DFORCE_DISABLE_KGLOBALACCEL=ON"
|
||||||
cmake --build "$BuildDir-kxmlgui" --config Debug --target install
|
cmake --build "$BuildDir-kxmlgui" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "kxmlgui"
|
CheckCompileResult "kxmlgui"
|
||||||
|
|
||||||
# Build glm
|
# Build glm
|
||||||
Clone "glm" "https://github.com/g-truc/glm.git"
|
Clone "glm" "https://github.com/g-truc/glm.git"
|
||||||
Configure "glm" "-DGLM_BUILD_TESTS=OFF"
|
Configure "glm" "-DGLM_BUILD_TESTS=OFF"
|
||||||
cmake --build "$BuildDir-glm" --config Debug --target install
|
cmake --build "$BuildDir-glm" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "glm"
|
CheckCompileResult "glm"
|
||||||
|
|
||||||
# Build Corrosion
|
# Build Corrosion
|
||||||
Clone "corrosion" "https://github.com/corrosion-rs/corrosion.git"
|
Clone "corrosion" "https://github.com/corrosion-rs/corrosion.git"
|
||||||
Configure "corrosion" "-DCORROSION_BUILD_TESTS=OFF"
|
Configure "corrosion" "-DCORROSION_BUILD_TESTS=OFF"
|
||||||
cmake --build "$BuildDir-corrosion" --config Debug --target install
|
cmake --build "$BuildDir-corrosion" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "corrosion"
|
CheckCompileResult "corrosion"
|
||||||
|
|
||||||
# Build nlohmann
|
# Build nlohmann
|
||||||
Clone "json" "https://github.com/nlohmann/json.git"
|
Clone "json" "https://github.com/nlohmann/json.git"
|
||||||
Configure "json" "-DJSON_BuildTests=OFF"
|
Configure "json" "-DJSON_BuildTests=OFF"
|
||||||
cmake --build "$BuildDir-json" --config Debug --target install
|
cmake --build "$BuildDir-json" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "json"
|
CheckCompileResult "json"
|
||||||
|
|
||||||
# Build stb
|
# Build stb
|
||||||
|
@ -183,11 +185,11 @@ CheckCompileResult "stb"
|
||||||
# Build SPIRV-Cross
|
# Build SPIRV-Cross
|
||||||
Clone "SPIRV-Cross" "https://github.com/KhronosGroup/SPIRV-Cross.git"
|
Clone "SPIRV-Cross" "https://github.com/KhronosGroup/SPIRV-Cross.git"
|
||||||
Configure "SPIRV-Cross"
|
Configure "SPIRV-Cross"
|
||||||
cmake --build "$BuildDir-SPIRV-Cross" --config Debug --target install
|
cmake --build "$BuildDir-SPIRV-Cross" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "SPIRV-Cross"
|
CheckCompileResult "SPIRV-Cross"
|
||||||
|
|
||||||
# Build SPIRV-Headers
|
# Build SPIRV-Headers
|
||||||
Clone "SPIRV-Headers" "https://github.com/KhronosGroup/SPIRV-Headers.git"
|
Clone "SPIRV-Headers" "https://github.com/KhronosGroup/SPIRV-Headers.git"
|
||||||
Configure "SPIRV-Headers"
|
Configure "SPIRV-Headers"
|
||||||
cmake --build "$BuildDir-SPIRV-Headers" --config Debug --target install
|
cmake --build "$BuildDir-SPIRV-Headers" --config Debug --target install --parallel $NumCores
|
||||||
CheckCompileResult "SPIRV-Headers"
|
CheckCompileResult "SPIRV-Headers"
|
||||||
|
|
Loading…
Add table
Reference in a new issue