diff --git a/third_party/CLI/CLI11.hpp b/third_party/CLI/CLI11.hpp index 33e937b87f3..2b426c5de72 100644 --- a/third_party/CLI/CLI11.hpp +++ b/third_party/CLI/CLI11.hpp @@ -158,7 +158,7 @@ #endif /** availability */ -#if defined(__APPLE__) && defined(__clang__) +#if defined(__clang__) #define CLI11_HAS_CODECVT 0 #elif defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER) && __GNUC__ < 5 #define CLI11_HAS_CODECVT 0 diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index a31d24971e9..766f193cb51 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -134,11 +134,15 @@ if(BUILD_TESTING) set_target_properties(gtest_main PROPERTIES FOLDER ThirdParty/gtest) set_target_properties(gmock PROPERTIES FOLDER ThirdParty/gtest) set_target_properties(gmock_main PROPERTIES FOLDER ThirdParty/gtest) + + set(is_clang "$") + set(v21_or_later "$,21>") + set(is_clang_v21_or_later "$") foreach(_gtest_target gtest gtest_main gmock gmock_main) if(TARGET ${_gtest_target}) target_compile_options(${_gtest_target} PRIVATE - $<$:-Wno-character-conversion> + "$<${is_clang_v21_or_later}:-Wno-character-conversion>" $<$:-Wno-deprecated-declarations> ) endif()