Skip to content

Commit

Permalink
Merge pull request #1562 from Hoikas/cmake-3.28.2-workaround
Browse files Browse the repository at this point in the history
Fix Linux CI.
  • Loading branch information
dpogue authored Feb 5, 2024
2 parents a591826 + b289be3 commit 131b106
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 131b106

Please sign in to comment.