Skip to content
  • Ben Boeckel's avatar
    EVIS: Reimplement using custom parsing code · bc385658
    Ben Boeckel authored and Brad King's avatar Brad King committed
    Introduce a new implementation of ExpandVariablesInString and select
    between the old and new implementations based on policy CMP0053.
    Instead of cmCommandArgumentParserHelper, use a custom parser with our
    own stack.  This is much faster and works well for our simple grammar.
    
    The new behavior of CMP0053 should expand @VAR@ syntax only in certain
    contexts.  All existing EVIS callers use "replaceAt == true" so
    hard-code our call to the old implementation.  Update the signature to
    default to "replaceAt == false" and pass "replaceAt == true" explicitly
    in the call sites for configure_file and string(CONFIGURE).
    
    Testing the configure (no generate) step with ParaView shows ~20%
    performance improvement.
    
    In terms of complete configure/generate steps, further testing with
    ParaView shows a 20% performance improvement over 2.8.12.2 with Unix
    Makefiles and minimal with Ninja. Ninja is less because it generate step
    is the expensive part (future work will address this) by a long shot and
    these changes help the configure step for the most part.
    bc385658