From d04d546b1759dc0aa053e475f5322fc4f0ec0921 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Mon, 29 Jul 2024 10:04:07 +0200 Subject: [PATCH] fix: `target_compile_definitions` scope fixed for `import std;` --- src/core/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 611bfcc7..ce9db06b 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -126,10 +126,10 @@ if(${projectPrefix}BUILD_CXX_MODULES) endif() if(${projectPrefix}BUILD_IMPORT_STD) - target_compile_definitions(mp-units-core PUBLIC ${projectPrefix}IMPORT_STD) + target_compile_definitions(mp-units-core ${${projectPrefix}TARGET_SCOPE} ${projectPrefix}IMPORT_STD) # https://github.com/llvm/llvm-project/issues/75057 if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19) - target_compile_options(mp-units-core PUBLIC "-Wno-deprecated-declarations") + target_compile_options(mp-units-core ${${projectPrefix}TARGET_SCOPE} "-Wno-deprecated-declarations") endif() endif()