cmake: sort package in header

This commit is contained in:
Christoph Junghans 2018-08-24 15:27:15 -06:00
parent b47e492233
commit 9ed6d0a9d1
1 changed files with 3 additions and 1 deletions

View File

@ -1008,7 +1008,9 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR})
######################################
set(temp "#ifndef LMP_INSTALLED_PKGS_H\n#define LMP_INSTALLED_PKGS_H\n")
set(temp "${temp}const char * LAMMPS_NS::LAMMPS::installed_packages[] = {\n")
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
set(temp_PKG_LIST ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
list(SORT temp_PKG_LIST)
foreach(PKG ${temp_PKG_LIST})
if(PKG_${PKG})
set(temp "${temp} \"${PKG}\",\n")
endif()