[cmake-developers] The "cmake_host_system_information" Command

Brad King brad.king at kitware.com
Tue Sep 4 08:29:23 EDT 2018


On 09/01/2018 08:50 PM, Taylor Holberton wrote:
> create non-trivial variables that make queries when they are expanded

I understand the proposal but I don't think we should do that.
The variable expansion logic is already one of the hottest
parts of the code shown in profiling.  Adding dispatch for
special variables will only make it slower for everything else.

Also, it is not unreasonable for long operations to be called out
by more explicit commands in the code.

Furthermore, some queries may have parameters.  The command can
do that.  Squeezing everything into a variable name won't work
well.

-Brad


More information about the cmake-developers mailing list