[Bug 561] New: build system lacks proper cppunit detection

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=561>

           Summary: build system lacks proper cppunit detection
           Product: RTT
           Version: rtt-trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Build System
        AssignedTo: orocos-dev@lists.mech.kuleuven.be
        ReportedBy: klaas.gadeyne@fmtc.be
                CC: orocos-dev@lists.mech.kuleuven.be
   Estimated Hours: 0.0

Created an attachment (id=311)

 --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=311)

check for cppunit if tests are enabled

The current cmake build systems lacks cppunit detection if tests are enabled,
hence, if cppunit is not installed in user lib, the error is only detected at
compile time.

Attached patch tries to solve this. It is by no means the best way, but it
seems to (TM) work.
Tested on a gnulinux build where I

mkdir /tmp/lib; sudo mv libcppunit* /tmp/lib
export CMAKE_LIBRARY_PATH=/tmp/lib

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

[Bug 561] build system lacks proper cppunit detection

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=561>

Klaas Gadeyne <klaas.gadeyne@fmtc.be> changed:

           What    |Removed                     |Added
 --------------------------------------------------------------------------
 Attachment #311 is|0                           |1
           obsolete|                            |
--- Comment #1 from Klaas Gadeyne <klaas.gadeyne@fmtc.be>  2008-05-29 21:42:29 ---

Created an attachment (id=312)

 --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=312)

Correct version

This one is better. There was a LINK_LIBRARIES line too much in the previous
patch (Validated on mac os x branch)

[Bug 561] build system lacks proper cppunit detection

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=561>

Klaas Gadeyne <klaas.gadeyne@fmtc.be> changed:

           What    |Removed                     |Added
 --------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
--- Comment #2 from Klaas Gadeyne <klaas.gadeyne@fmtc.be>  2008-05-30 23:39:42 ---

Since I heard no complaints :-)

$ svn --username=kgadeyne commit -m "fix bug #561: build system lacks proper
cppunit detection" config/global_setup.cmake
Sending config/global_setup.cmake
Transmitting file data .
Committed revision 29340.

[Bug 561] build system lacks proper cppunit detection

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=561>

Peter Soetens <peter.soetens@fmtc.be> changed:

           What    |Removed                     |Added
 --------------------------------------------------------------------------
                 CC|                            |peter.soetens@fmtc.be
--- Comment #3 from Peter Soetens <peter.soetens@fmtc.be>  2008-05-31 00:09:51 ---

Just as a note, you should also provide a patch for the tests/CMakeLists.txt
file such that the variables are used.

Peter