diff --git a/cmake/build/ClangTidy.cmake b/cmake/build/ClangTidy.cmake index 8b503bd..757066f 100644 --- a/cmake/build/ClangTidy.cmake +++ b/cmake/build/ClangTidy.cmake @@ -45,14 +45,11 @@ set(CMAKE_CXX_CLANG_TIDY ${CLANGTIDY_COMMAND} ${USE_CLANGTIDY_OPTIONS}) # Add the standard to the clang-tidy options if(NOT "${CMAKE_CXX_STANDARD}" STREQUAL "") - if("${USE_CLANGTIDY_OPTIONS_DRIVER_MODE}" STREQUAL "cl") - set(CLANG_TIDY_STANDARD_BY_DRIVER -extra-arg=/std:c++${CMAKE_CXX_STANDARD}) + if(MSVC) + list(APPEND CMAKE_CXX_CLANG_TIDY -extra-arg=/std:c++${CMAKE_CXX_STANDARD}) else() - set(CLANG_TIDY_STANDARD_BY_DRIVER -extra-arg=-std=c++${CMAKE_CXX_STANDARD}) + list(APPEND CMAKE_CXX_CLANG_TIDY -extra-arg=-std=c++${CMAKE_CXX_STANDARD}) endif() - - list(APPEND CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_STANDARD_BY_DRIVER}) - unset(CLANG_TIDY_STANDARD_BY_DRIVER) endif() if(USE_CLANGTIDY_WARNINGS_AS_ERRORS)