Skip to content

Commit

Permalink
fix: Remove clang-tidy language standard arg
Browse files Browse the repository at this point in the history
  • Loading branch information
FeignClaims committed Aug 13, 2024
1 parent ca70709 commit 67f136d
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/StaticAnalyzers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ function(_enable_clang_tidy_setup_cl CXX_FLAGS C_FLAGS)
set(CLANG_TIDY_CXX_FLAGS ${CXX_FLAGS})
set(CLANG_TIDY_C_FLAGS ${C_FLAGS})

if(CMAKE_CXX_STANDARD)
list(APPEND CLANG_TIDY_CXX_FLAGS -extra-arg=/std:c++${CMAKE_CXX_STANDARD})
endif()

if(CMAKE_C_STANDARD)
list(APPEND CLANG_TIDY_C_FLAGS -extra-arg=/std:c${CMAKE_C_STANDARD})
endif()

set(CLANG_TIDY_CXX_FLAGS ${CLANG_TIDY_CXX_FLAGS} PARENT_SCOPE)
set(CLANG_TIDY_C_FLAGS ${CLANG_TIDY_C_FLAGS} PARENT_SCOPE)
endfunction()
Expand Down Expand Up @@ -153,22 +145,6 @@ function(_enable_clang_tidy_setup CXX_FLAGS C_FLAGS)
set(CLANG_TIDY_CXX_FLAGS ${CXX_FLAGS})
set(CLANG_TIDY_C_FLAGS ${C_FLAGS})

if(CMAKE_CXX_STANDARD)
if(CMAKE_CXX_EXTENSIONS)
list(APPEND CLANG_TIDY_CXX_FLAGS -extra-arg=-std=gnu++${CMAKE_CXX_STANDARD})
else()
list(APPEND CLANG_TIDY_CXX_FLAGS -extra-arg=-std=c++${CMAKE_CXX_STANDARD})
endif()
endif()

if(CMAKE_C_STANDARD)
if(CMAKE_C_EXTENSIONS)
list(APPEND CLANG_TIDY_C_FLAGS -extra-arg=-std=gnu${CMAKE_C_STANDARD})
else()
list(APPEND CLANG_TIDY_C_FLAGS -extra-arg=-std=c${CMAKE_C_STANDARD})
endif()
endif()

if(CMAKE_CROSSCOMPILING)
_enable_clang_tidy_setup_cross("${CLANG_TIDY_CXX_FLAGS}" "${CLANG_TIDY_C_FLAGS}")
endif()
Expand Down

0 comments on commit 67f136d

Please sign in to comment.