From 6abc1204f3c246a32d7086da20e50b5df358fe78 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Tue, 4 Jun 2024 21:47:40 +0800 Subject: [PATCH] Check if the generator is ninja --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd989667..da835ea2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ function(add_module_library name) target_compile_options(${name} PUBLIC -fmodules-ts) endif () - if (CMAKE_VERSION VERSION_LESS 3.28) + if (CMAKE_VERSION VERSION_LESS 3.28 OR NOT(CMAKE_GENERATOR STREQUAL "Ninja")) # `std` is affected by CMake options and may be higher than C++20. get_target_property(std ${name} CXX_STANDARD)