Skip to content

Commit

Permalink
Merge pull request sxs-collaboration#6220 from nilsvu/fix_pch
Browse files Browse the repository at this point in the history
Fix PCH issue
  • Loading branch information
nilsdeppe authored Aug 15, 2024
2 parents 6445151 + 7228bc8 commit 5c08314
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmake/SetupBlaze.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ target_compile_definitions(Blaze
BLAZE_USE_ALWAYS_INLINE=${_BLAZE_USE_ALWAYS_INLINE}
)

target_compile_options(Blaze
target_precompile_headers(Blaze
INTERFACE
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include ${CMAKE_SOURCE_DIR}/tools/BlazeExceptions.hpp>")
${CMAKE_SOURCE_DIR}/tools/BlazeExceptions.hpp
)

add_interface_lib_headers(
TARGET Blaze
Expand Down
5 changes: 4 additions & 1 deletion src/IO/Exporter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ add_subdirectory(Python)
# - The `TARGET_OBJECTS` generator expression links in the objects from the
# Exporter library, because otherwise they wouldn't be used and therefore
# wouldn't be linked in.
# Note that `TARGET_OBJECTS` also includes precompiled headers. LLVM's lld
# is smart enough to ignore them, but GNU's ld isn't, so we have to filter
# them out (see https://gitlab.kitware.com/cmake/cmake/-/issues/22832).
# - The `EXPORTER_LINKED_LIBS` are needed to resolve the symbols for the
# `TARGET_OBJECTS`, just like in the Exporter library (of which this library
# is basically an extended copy).
Expand All @@ -67,7 +70,7 @@ get_target_property(EXPORTER_LINKED_LIBS ${LIBRARY} LINK_LIBRARIES)
target_link_libraries(
${BUNDLED_EXPORTER_LIB}
PRIVATE
$<TARGET_OBJECTS:${LIBRARY}>
$<FILTER:$<TARGET_OBJECTS:${LIBRARY}>,EXCLUDE,.*\\.gch>
${EXPORTER_LINKED_LIBS}
Informer
CharmModuleInit
Expand Down

0 comments on commit 5c08314

Please sign in to comment.