Skip to content

Commit

Permalink
Always use precompiled headers when enabled
Browse files Browse the repository at this point in the history
As precompiled headers are a build time optimization, we want to use
them always (if supported), as otherwise we would intentionally slow
down builds due to the big precompiled header that the compiler parses
for every C++ source file.

Also given that precompiled headers are a user configuration option, we
don't want to silently disable it on some condition.
  • Loading branch information
Sven Püschel authored and jwiegley committed Oct 19, 2024
1 parent 46cc4d7 commit 6030c6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ else()
add_ledger_library_dependencies(ledger)
endif()

if (PRECOMPILE_SYSTEM_HH AND (CMAKE_BUILD_TYPE STREQUAL "Debug"))
if (PRECOMPILE_SYSTEM_HH)
if (BUILD_LIBRARY)
target_precompile_headers(libledger PRIVATE ${PROJECT_BINARY_DIR}/system.hh)
target_precompile_headers(ledger REUSE_FROM libledger)
Expand Down

0 comments on commit 6030c6a

Please sign in to comment.