> Am 22.01.2019 um 17:03 schrieb Brad King <brad.k...@kitware.com>: > > Yes, something more extensible would be fine. We need to be careful > not to slow down the variable reference syntax parser though.
Currently, the Code that evaluates the ${}-Syntax only evaluates the key, if the key is not an empty string: const char* cmCommandArgumentParserHelper::ExpandSpecialVariable( const char* key, const char* var) { if (!key) { return this->ExpandVariable(var); } if (!var) { return ""; } if (strcmp(key, "ENV") == 0) { std::string str; if (cmSystemTools::GetEnv(var, str)) { if (this->EscapeQuotes) { return this->AddString(cmSystemTools::EscapeQuotes(str)); } return this->AddString(str); } return ""; } if (strcmp(key, „CACHE") == 0) { … so, there seems to be no risk to slow down the ExpandVariable()-Path (but of cause, I would measure the difference). kind regards, Torsten
signature.asc
Description: Message signed with OpenPGP
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers