Skip to content

Commit

Permalink
fix: disable pch for ModuleLib
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Sep 29, 2024
1 parent ae8f31a commit 875c335
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions cmake/modules/BaseConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ option(DEBUG_LOG "Enable Debug Log" OFF)
option(ASAN_ENABLED "Build this target with AddressSanitizer" OFF)
option(BUILD_STATIC_LIBRARY "Build using static libraries" OFF)
option(SPEED_UP_BUILD_UNITY "Compile using build unity for speed up build" ON)
option(USE_PRECOMPILED_HEADER "Compile using precompiled header" ON)
option(USE_PRECOMPILED_HEADERS "Compile using precompiled header" ON)

# === TOGGLE_BIN_FOLDER ===
if(TOGGLE_BIN_FOLDER)
Expand Down Expand Up @@ -149,12 +149,12 @@ else()
log_option_disabled("SPEED_UP_BUILD_UNITY")
endif(SPEED_UP_BUILD_UNITY)

# === USE_PRECOMPILED_HEADER ===
if(USE_PRECOMPILED_HEADER)
log_option_enabled("USE_PRECOMPILED_HEADER")
# === USE_PRECOMPILED_HEADERS ===
if(USE_PRECOMPILED_HEADERS)
log_option_enabled("USE_PRECOMPILED_HEADERS")
else()
log_option_disabled("USE_PRECOMPILED_HEADER")
endif(USE_PRECOMPILED_HEADER)
log_option_disabled("USE_PRECOMPILED_HEADERS")
endif(USE_PRECOMPILED_HEADERS)

# *****************************************************************************
# Compiler Options
Expand Down
4 changes: 3 additions & 1 deletion cmake/modules/CanaryLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ add_subdirectory(utils)
target_sources(${PROJECT_NAME}_lib PRIVATE canary_server.cpp)

# Add public pre compiler header to lib, to pass down to related targets
target_precompile_headers(${PROJECT_NAME}_lib PUBLIC pch.hpp)
if(NOT TARGET ModuleLib)
target_precompile_headers(${PROJECT_NAME}_lib PUBLIC pch.hpp)
endif()

if(USE_PRECOMPILED_HEADERS)
target_compile_definitions(${PROJECT_NAME}_lib PUBLIC -DUSE_PRECOMPILED_HEADERS)
Expand Down

0 comments on commit 875c335

Please sign in to comment.