eProsima / Fast-DDS

The most complete DDS - Proven: Plenty of success cases. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
Apache License 2.0
2.16k stars 765 forks source link

incorrectly added -lrt library when building for QNX [8998] #1309

Closed amdsobhy closed 4 years ago

amdsobhy commented 4 years ago

in https://github.com/eProsima/Fast-DDS/blob/master/cmake/modules/FindThirdpartyBoost.cmake, line 16

FastRTPS: commit 40568fa (HEAD -> 2.0.x, tag: v2.0.1, origin/2.0.x)

jwillemsen commented 4 years ago

Maybe open a pull request so that this can be more easily integrated?

MiguelCompany commented 4 years ago

Maybe open a pull request so that this can be more easily integrated?

@amdsobhy I second this. Please open a pull request with the suggested change.

asobhy-qnx commented 4 years ago

will do

pablorcum commented 3 years ago

This is still failing for QNX Neutrino. CMake OS flag as of today (see here) is QNXNTO instead of QNX. Please add: if(WIN32 OR APPLE OR QNX OR QNXNTO)

asobhy-qnx commented 3 years ago

Hi @pablorcum, you need to add this in your toolchain file set(QNX TRUE) set(CMAKE_SYSTEM_NAME QNX)

You can take a look at the toolchain file here https://github.com/asobhy-qnx/bullet3/blob/master/qnx.nto.toolchain.cmake as a reference.

pablorcum commented 3 years ago

Thank you, @asobhy-qnx. That's right, I had added set(QNX 1) to my QNX toolchain file, which had already set(CMAKE_SYSTEM_NAME QNX), and it works. But it is a workaround.

CMake already adds automatically set(QNXNTO 1) if it detects crosscompiling to QNX as shown here. No need to add any environment variable in the toolchain file. Therefore, and to be compliant to CMake documentation and so that it works off-the-shelf, QNXNTO should be added to FindThirdpartyBoost.cmake.

asobhy-qnx commented 3 years ago

Thank you for the clarification. It does seem like the better way to do it. I would like to test it then maybe change it to QNXNTO instead

asobhy-qnx commented 3 years ago

@pablorcum https://github.com/eProsima/Fast-DDS/pull/1456 & https://github.com/eProsima/Fast-DDS/pull/1455 Thank you