From faf83406a95b40098eb82af82c0c59b6e6826a6e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 11 Apr 2023 15:59:08 -0700 Subject: [PATCH] Workaround cmake issue --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 448474e6..cc413fb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -242,6 +242,10 @@ if (FMT_MODULE) enable_module(fmt) target_sources(fmt PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES src/fmt.cc) + # Workaround a CMake issue when using fmt as a subdirectory. + target_compile_options( + fmt PUBLIC + -fprebuilt-module-path=${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/fmt.dir) # Workaround a bug in clang-scan-deps. target_include_directories( fmt PUBLIC /usr/lib/gcc/x86_64-linux-gnu/12/include)