From fbdc6d69be1410ec06aa2ffb43699333e04ab100 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Thu, 7 Mar 2019 12:19:44 +0100 Subject: [PATCH] Add a notification when files are not sorted in CMake Would've solved the problem in #2039 faster. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f0e0c71d..763b6bd35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,6 +218,9 @@ function(set_glob VAR GLOBBING EXTS DIRECTORY) # ... if(GLOB_BUT_NOT_LIST) message(AUTHOR_WARNING "Entries only present in ${DIRECTORY}: ${GLOB_BUT_NOT_LIST}") endif() + if(NOT LIST_BUT_NOT_GLOB AND NOT GLOB_BUT_NOT_LIST) + message(AUTHOR_WARNING "${VAR} is not alphabetically sorted") + endif() endif() endif()