diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2017-11-21 16:35:41 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2017-11-21 16:35:41 (GMT) |
commit | fb3c5bfdbe87786169dfe6d3ddaa86f4f6a5676f (patch) | |
tree | ce6bddd731e8c0bd4b2e3d750807481d525bc41e /Source | |
parent | daeadde88871f4e2473ce429f459ae8d6ed0ffb8 (diff) | |
download | CMake-fb3c5bfdbe87786169dfe6d3ddaa86f4f6a5676f.zip CMake-fb3c5bfdbe87786169dfe6d3ddaa86f4f6a5676f.tar.gz CMake-fb3c5bfdbe87786169dfe6d3ddaa86f4f6a5676f.tar.bz2 |
cmTargetPropertyComputer: whitelist custom properties
CMake's properties will never begin with an underscore or a lowercase
letter, so allow them to be set by projects.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTargetPropertyComputer.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index ed9026e..06ce0b1 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -3,6 +3,7 @@ #include "cmTargetPropertyComputer.h" +#include <cctype> #include <sstream> #include <unordered_set> @@ -49,6 +50,12 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( if (cmHasLiteralPrefix(prop, "INTERFACE_")) { return true; } + if (cmHasLiteralPrefix(prop, "_")) { + return true; + } + if (std::islower(prop[0])) { + return true; + } static std::unordered_set<std::string> builtIns; if (builtIns.empty()) { builtIns.insert("COMPATIBLE_INTERFACE_BOOL"); |