Procházet zdrojové kódy

Merge pull request #23 from gunrot/noheaderext

handle header without extension
master
Matt Arsenault před 5 roky
committed by GitHub
rodič
revize
99e159ec9b
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. +5
    -0
      cmake/sanitize-helpers.cmake

+ 5
- 0
cmake/sanitize-helpers.cmake Zobrazit soubor

@@ -25,6 +25,11 @@
# Helper function to get the language of a source file.
function (sanitizer_lang_of_source FILE RETURN_VAR)
get_filename_component(LONGEST_EXT "${FILE}" EXT)
# If extension is empty return. This can happen for extensionless headers
if("${LONGEST_EXT}" STREQUAL "")
set(${RETURN_VAR} "" PARENT_SCOPE)
return()
endif()
# Get shortest extension as some files can have dot in their names
string(REGEX REPLACE "^.*(\\.[^.]+)$" "\\1" FILE_EXT ${LONGEST_EXT})
string(TOLOWER "${FILE_EXT}" FILE_EXT)


Načítá se…
Zrušit
Uložit