[cmake-developers] INCLUDE_DIRECTORIES variable expansion

Brad King brad.king at kitware.com
Thu Dec 6 10:47:15 EST 2012


On 11/29/2012 02:48 PM, Stephen Kelly wrote:
> So maybe I should only do the expansion if containsVariable is true?
> 
> +//----------------------------------------------------------------------------
> +static bool containsVariable(const std::string &lib)
> +{
> +  const std::string::size_type openpos = lib.find("${");
> +  return (openpos != std::string::npos)
> +      && (lib.find("}", openpos) != std::string::npos);
> +}
> 
> Then I wouldn't need a policy.

IMO the policy is worthwhile anyway.  I reverted your previous
topic using the above approach and replaced it with this:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a0a5c78

-Brad



More information about the cmake-developers mailing list