Skip to content

Commit

Permalink
Fix Linux CI.
Browse files Browse the repository at this point in the history
Per @dpogue, the problem is https://gitlab.kitware.com/cmake/cmake/-/issues/25650.
Long story short, CMake broke PCH and Unity on CMake 3.28.2, so disable
that combination when it's used.
  • Loading branch information
Hoikas committed Feb 4, 2024
1 parent ef73775 commit b289be3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/PlasmaTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ cmake_dependent_option(
OFF
)

# CMake 3.28.2 breaks precompiled headers and unity builds.
# Debounce this known bad combination.
if(CMAKE_VERSION VERSION_EQUAL 3.28.2 AND PLASMA_USE_PCH AND CMAKE_GENERATOR MATCHES Ninja|Makefiles)
set(_UNITY_BROKEN TRUE)
endif()

cmake_dependent_option(
PLASMA_UNITY_BUILD
"Enable unity build?"
ON
"CMAKE_VERSION VERSION_GREATER_EQUAL 3.16;ALLOW_BUILD_OPTIMIZATIONS"
"CMAKE_VERSION VERSION_GREATER_EQUAL 3.16;ALLOW_BUILD_OPTIMIZATIONS;NOT _UNITY_BROKEN"
OFF
)

Expand Down

0 comments on commit b289be3

Please sign in to comment.