From 798d9a29a243914227dbc0dcf28cd39bad54291d Mon Sep 17 00:00:00 2001 From: Gunnar Roth Date: Wed, 10 Oct 2018 16:54:30 +0200 Subject: [PATCH] handle objeclib only input for target if compiler num is 0 this is not always an error, as that can also happen, when having only a objectlib as input and no other source files. --- cmake/FindSanitizers.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 cmake/FindSanitizers.cmake diff --git a/cmake/FindSanitizers.cmake b/cmake/FindSanitizers.cmake old mode 100644 new mode 100755 index a11809b..101bab8 --- a/cmake/FindSanitizers.cmake +++ b/cmake/FindSanitizers.cmake @@ -77,12 +77,12 @@ function(add_sanitizers ...) "Target will be compiled without sanitizers.") return() - # If the target is compiled by no known compiler, ignore it. + # If the target is compiled by no or no known compiler, give a warning. elseif (NUM_COMPILERS EQUAL 0) - message(WARNING "Can't use any sanitizers for target ${TARGET}, " - "because it uses an unknown compiler. Target will be " - "compiled without sanitizers.") - return() + message(WARNING "Sanitizers for target ${TARGET} may not be" + " usable, because it uses no or an unknown compiler. " + "This is a false warning for targets using only " + "object lib(s) as input.") endif () # Add sanitizers for target.