• Seth R Johnson's avatar
    FindSWIG: reduce calls to SWIG exe, and clean up variables · ff6f7b23
    Seth R Johnson authored
    If all SWIG cache variables (EXECUTABLE, DIR, VERSION) are set,
    there should be no need to invoke the SWIG exe on a reconfigure. This
    changeset reduces the number of calls to the SWIG executable, and
    additonially prevents temporary `SWIG_xxx` values from propagating outside
    the `find_package` call.
    
    I also refactored the conditionals to be less nested (and thus more
    predictable), including changing theh definition of SWIG_USE_FILE to
    reflect that it's if and only if SWIG_FOUND is trure.
    ff6f7b23
FindSWIG.cmake 5.4 KB