diff --git a/CMakeLists.txt b/CMakeLists.txt index 76d9397a8..79d7922f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -660,6 +660,16 @@ SET (PBRT_UTIL_SOURCE src/pbrt/util/vecmath.cpp ) +# A warning about a deprecated function in C++17 but the solution will only be +# in C++26. +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + set_source_files_properties( + src/pbrt/util/string.cpp + PROPERTIES + COMPILE_FLAGS "-Wno-deprecated-declarations" + ) +endif() + SET (PBRT_UTIL_SOURCE_HEADERS src/pbrt/util/args.h src/pbrt/util/bluenoise.h