Sort header files before generating cppkafka.h

This commit is contained in:
Matias Fontanini
2018-04-23 19:22:41 -07:00
parent cb2c8877d8
commit 59d8adc4a4
2 changed files with 2 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
function(make_cppkafka_header)
set(CPPKAFKA_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/cppkafka.h)
file(GLOB INCLUDE_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h" "utils/*.h")
list(SORT INCLUDE_HEADERS)
foreach(header ${INCLUDE_HEADERS})
if (NOT ${header} MATCHES "cppkafka.h")
SET(CPPKAFKA_HEADERS "${CPPKAFKA_HEADERS}#include <cppkafka/${header}>\n")