#39 libs check in LibrarySet after setting if and unless

cpptasks (35)


Right now a LibrarySet checks for IsValid when
receiving the 'libs' attribute list.
If the list is empty a 'libnames not specified or
empty.' warning is logged even if an 'if' or 'unless'
attribute has been specified that invalids the syslibset.

The following patch moves the library names checks to
the visitLibraries instead so that the LibrarySet is
fully configured.


  • Mathieu Champlon

    Logged In: YES

    Forgot file....

  • Mathieu Champlon

    Logged In: YES

    Here is the corresponding patch for TestLibrarySet.
    However it should probably be refactored to use (real) mock
    objects (like easymock or jmock ?)...

  • Curt Arnold

    Curt Arnold - 2006-03-17

    Logged In: YES

    Took another track on this. The fix for Bug 1380336 added
    build failures on Windows style links if a lib name did not
    result in a match on an available library file. That
    message (and hopefully messages from the linker on ld type
    links) will hopefully be sufficient to clue the user that he
    needs to drop leading lib or trailing .so or .a from his
    library names, so I removed the warning altogether.

    p.s.: Thanks for the unit test, but good ones should fail
    with the existing implementation. Adding a check that there
    were no messages immediately after setLibs would have
    resulted in a test that fails with the old passes with the
    new. Also moving the check to visitLibraries would cause
    the library names not to be checked on ld type linkers since
    they use -l command line options and not visitLibraries.

    Changes committed LibrarySet.java v1.29, TestLibrarySet.java
    v 1.16.

  • Curt Arnold

    Curt Arnold - 2006-03-17
    • status: open --> closed-fixed

Log in to post a comment.