Cmake: ENCODING parameter in file(STRINGS ...) only valid for cmake version >= 3.1

This commit is contained in:
Kornel Benko 2015-11-26 12:08:13 +01:00
parent 6a9d9d1caf
commit 21c265addb

View File

@ -150,7 +150,12 @@ set(known_labels "export" "key" "layout" "load" "lyx2lyx"
macro(loadTestList filename resList)
# Create list of strings from a file without comments
file(STRINGS ${filename} tempList ENCODING "UTF-8")
# ENCODING parameter is a new feature in cmake 3.1
if (CMAKE_VERSION VERSION_GREATER "3.1")
file(STRINGS ${filename} tempList ENCODING "UTF-8")
else()
file(STRINGS ${filename} tempList)
endif()
set(${resList})
set(sublabel)
set(mylabels "")