From 8454949adba174e29346a372788b93a7fcc466f8 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Sat, 15 Feb 2025 18:16:39 +0100 Subject: [PATCH] build: silenced MSVC warning for `#include` in a module purview --- src/core/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 2a1dedd3..6302a9cb 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -126,6 +126,11 @@ if(${projectPrefix}BUILD_CXX_MODULES) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18) target_compile_options(mp-units-core PUBLIC "-Wno-include-angled-in-module-purview") endif() + + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # '#include ' in the purview of module 'module-name-1' appears erroneous + target_compile_options(mp-units-core PUBLIC "/wd5244") + endif() endif() endif()