Menu

#74 FindACE.cmake fails out of sourcetree build

v1.0 (example)
closed-out-of-date
None
5
2017-11-02
2010-10-28
TEH
No

When creating an out-of-sourcetree build, cmake fails to find ACE. Caused by incorrect paths (use of CMAKE_BINARY_DIR instead of CMAKE_SOURCE_DIR)

Patch attached.

Discussion

  • TEH

    TEH - 2010-10-28
     
  • Paul Fitzpatrick

    Thanks hauptmech. In fact, the current behavior is by design: the ace4yarp directory is treated as build-specific material rather than source. I do see that this is odd. But it is useful, at least for developers with multiple builds of YARP configured in different ways using the same source tree. What I can do is commit a change which looks for ace4yarp in the source directory if it is not present in the build directory. I'll close this bug when that is done.
    I noticed that you had a problem with librt in the patch too. Hardcoding rt as you did would break some builds. A better solution would be to provide more paths to FIND_LIBRARY. Where was rt on your system?
    Thanks, Paul

     
  • Paul Fitzpatrick

    • assigned_to: nobody --> eshuy
     
  • Paul Fitzpatrick

    Change committed:
    * If ace4yarp not found in build directory, the source directory is also checked before falling back on external ace package search.
    * If rt library is not found, a compile test is also done before assuming that it is not present. This should cover the case where the system compiler knows how to find rt but cmake (for whatever reason) doesn't know about the relevant system paths.
    These changes should not break existing builds, and hopefully work for you also. Please let me know how it goes. Also, If I had your name I could credit you in the ChangeLog :-)
    Thanks,
    Paul

     
  • TEH

    TEH - 2010-10-29

    Paul, Didn't mean to include the librt bit. It was a quick hack, didn't even notice the ACE_RT_LIBRARY stuff. I'm cross compiling yarp to a embedded platform. librt is in CMAKE_FIND_ROOT_PATH/usr/lib

     
  • Daniele E. Domenichelli

    • status: open --> closed-out-of-date
    • Group: --> v1.0 (example)