-if(NOT MSVC)
- add_target_compile_flags(libxslt "-Wno-pointer-sign -Wno-unused-function")
- if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
- add_target_compile_flags(libxslt "-Wno-unused-but-set-variable")
- endif()
+if(USE_CLANG_CL OR (NOT MSVC))
+ target_compile_options(libxslt PRIVATE -Wno-pointer-sign -Wno-unused-function)