From 8ec94ac6a5cb1a7f8ee8a86bebc1100fd7b212ca Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 14 Apr 2023 11:57:17 -0700 Subject: [PATCH] Use full path to pcm --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a209510..fb650f41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,8 @@ function(add_module_library name) set(pcm ${pcm}.pcm) # Propagate -fmodule-file=*.pcm to targets that link with this library. - target_compile_options(${name} PUBLIC -fmodule-file=${pcm}) + target_compile_options( + ${name} PUBLIC -fmodule-file=${CMAKE_CURRENT_BINARY_DIR}/${pcm}) # Use an absolute path to prevent target_link_libraries prepending -l # to it.