mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 15:45:58 +01:00
build: use PCH to reduce compile time (#3095)
This commit is contained in:
parent
4eecb8bffc
commit
8e9f010ee0
3 changed files with 35 additions and 0 deletions
|
@ -71,6 +71,7 @@ endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
.
|
.
|
||||||
|
"src/"
|
||||||
"subprojects/wlroots/include/"
|
"subprojects/wlroots/include/"
|
||||||
"subprojects/wlroots/build/include/"
|
"subprojects/wlroots/build/include/"
|
||||||
"subprojects/udis86/"
|
"subprojects/udis86/"
|
||||||
|
@ -168,6 +169,10 @@ set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
||||||
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
|
message(STATUS "Setting precompiled headers")
|
||||||
|
|
||||||
|
target_precompile_headers(Hyprland PRIVATE $<$<COMPILE_LANGUAGE:CXX>:src/pch/pch.hpp>)
|
||||||
|
|
||||||
message(STATUS "Setting link libraries")
|
message(STATUS "Setting link libraries")
|
||||||
|
|
||||||
target_link_libraries(Hyprland rt PkgConfig::deps)
|
target_link_libraries(Hyprland rt PkgConfig::deps)
|
||||||
|
|
|
@ -4,6 +4,7 @@ src = globber.stdout().strip().split('\n')
|
||||||
executable('Hyprland', src,
|
executable('Hyprland', src,
|
||||||
cpp_args: ['-DWLR_USE_UNSTABLE'],
|
cpp_args: ['-DWLR_USE_UNSTABLE'],
|
||||||
link_args: '-rdynamic',
|
link_args: '-rdynamic',
|
||||||
|
cpp_pch: 'pch/pch.hpp',
|
||||||
dependencies: [
|
dependencies: [
|
||||||
server_protos,
|
server_protos,
|
||||||
dependency('wayland-server'),
|
dependency('wayland-server'),
|
||||||
|
|
29
src/pch/pch.hpp
Normal file
29
src/pch/pch.hpp
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#include "Compositor.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <any>
|
||||||
|
#include <array>
|
||||||
|
#include <chrono>
|
||||||
|
#include <concepts>
|
||||||
|
#include <deque>
|
||||||
|
#include <filesystem>
|
||||||
|
#include <fstream>
|
||||||
|
#include <functional>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <iostream>
|
||||||
|
#include <iterator>
|
||||||
|
#include <list>
|
||||||
|
#include <map>
|
||||||
|
#include <memory>
|
||||||
|
#include <mutex>
|
||||||
|
#include <optional>
|
||||||
|
#include <random>
|
||||||
|
#include <ranges>
|
||||||
|
#include <regex>
|
||||||
|
#include <set>
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
#include <thread>
|
||||||
|
#include <tuple>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
Loading…
Reference in a new issue