• miller86's avatar
    How do you override where VisIt obtains a given 3rd party lib from on the · 4dd3f0b0
    miller86 authored
    command-line to CMake? By 'override', I mean change from what the default
    (config-site file says) is?
    Do you specify -DFOO_DIR:PATH=<path> or -DVISIT_FOO_DIR:PATH=<path>?
        Neither worked.
    Is the ':PATH' really necessary?
        Don't know but I am not taking any chances.
    I could not get VisIt's CMake behavior to accept overrides of 3rd party
    libs directory locations using on the command line to CMake. There is
    some stuff going on in CMake where VISIT_3RDPARTY_VAR/DEP macros are
    concerned that I just don't understand.
    For a lib named FOO, here are actions that occured...
    The VISIT_3RDPARTY_VAR/DEP macro summarily called
    However, that SET() call would silently fail (e.g. value of VISIT_FOO_DIR
    would NOT change) if VISIT_FOO_DIR had been previously defined, typicaly
    by a config-site file's VISIT_OPTION_DEFAULT(VISIT_FOO_DIR...) line.
    On the other hand, if VISIT_FOO_DIR had NOT been previously defined then,
    the SET() call would succeed ensuring an entry for FOO was in the cache
    for SetUpThirdParty.cmake to later find.
    Immediately after the above SET() command, the macro would test to see if
    VISIT_FOO_DIR had the value "VISIT_FOO_DIR-NOTFOUND" (in other words, did
    the above SET() operation actually do anything) and if NOT, then copy the
    value of VISIT_FOO_DIR into FOO_DIR.
    Ultimately, it is FOO_DIR that SetUpThirdParty.cmake uses to test/ensure
    a lib is setup correctly. And, the previous logic did take whatever the
    value of VISIT_FOO_DIR was and put it into FOO_DIR. So, I reasoned that
    -DFOO_DIR:PATH=<path> is the correct format for 3rd party lib override
    options on command line to CMake. I adjusted logic in VISIT_3RDPARTY_VAR/DEP
    macros to make that work. I also removed redundant argument to these macros
    (e.g. VISIT_FOO_DIR and FOO_DIR were replaced with just FOO_DIR) so the
    macros generate the 'VISIT_FOO_DIR' symbol given the 'FOO_DIR' symbol. I
    also ensured that when a lib is so overrided, the value cached for
    VISIT_FOO_DIR (is forced to match) matches VISIT_FOO specified on CL.
    git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@14460 18c085ea-50e0-402c-830e-de6fd14e8384
CMakeLists.txt 80.8 KB