Pārlūkot izejas kodu

Merge pull request #21 from 9fcc/master

Fix unclear error while accidentally sanitizing interface library
master
Matt Arsenault pirms 7 gadiem
committed by GitHub
vecāks
revīzija
aab6948fa8
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. +7
    -0
      cmake/FindSanitizers.cmake

+ 7
- 0
cmake/FindSanitizers.cmake Parādīt failu

@@ -62,6 +62,13 @@ function(add_sanitizers ...)
foreach (TARGET ${ARGV})
# Check if this target will be compiled by exactly one compiler. Other-
# wise sanitizers can't be used and a warning should be printed once.
get_target_property(TARGET_TYPE ${TARGET} TYPE)
if (TARGET_TYPE STREQUAL "INTERFACE_LIBRARY")
message(WARNING "Can't use any sanitizers for target ${TARGET}, "
"because it is an interface library and cannot be "
"compiled directly.")
return()
endif ()
sanitizer_target_compilers(${TARGET} TARGET_COMPILER)
list(LENGTH TARGET_COMPILER NUM_COMPILERS)
if (NUM_COMPILERS GREATER 1)


Notiek ielāde…
Atcelt
Saglabāt