From cb7f9140da2fddae527bac1ff6d769bd98fbf719 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 14 Sep 2024 01:24:14 +0300 Subject: [PATCH] CMake: print pch messages based on var --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1718b2d..c1d1a6b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,10 +216,13 @@ set(CPACK_PROJECT_NAME ${PROJECT_NAME}) set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) include(CPack) -message(STATUS "Setting precompiled headers") - -target_precompile_headers(Hyprland PRIVATE - $<$:src/pch/pch.hpp>) +if(CMAKE_DISABLE_PRECOMPILE_HEADERS) + message(STATUS "Not using precompiled headers") +else() + message(STATUS "Setting precompiled headers") + target_precompile_headers(Hyprland PRIVATE + $<$:src/pch/pch.hpp>) +endif() message(STATUS "Setting link libraries")