Include flags depending on the ConnextDDS version
Information
- RTI Product: ConnextDDS Pro
- Version: 6.1.0
- Operating system: Linux
- Compiler: gcc
- Compiler version: 7.3.0
- Additional information:
What is the current behavior?
There are some examples (listed below) that add flags already included by FindRTIConnextDDS
File list
10 results - 10 filesexamples/connext_dds/dynamic_data_access_union_discriminator/c/CMakeLists.txt: 43 PROPERTIES 44: LINK_FLAGS -Wl,--no-as-needed) 45 endif()
examples/connext_dds/dynamic_data_access_union_discriminator/c++/CMakeLists.txt: 43 PROPERTIES 44: LINK_FLAGS -Wl,--no-as-needed) 45 endif()
examples/connext_dds/dynamic_data_access_union_discriminator/c++03/CMakeLists.txt: 38 PROPERTIES 39: LINK_FLAGS -Wl,--no-as-needed) 40 endif()
examples/connext_dds/dynamic_data_access_union_discriminator/c++11/CMakeLists.txt: 38 PROPERTIES 39: LINK_FLAGS -Wl,--no-as-needed) 40 endif()
examples/connext_dds/dynamic_data_nested_structs/c/CMakeLists.txt: 43 PROPERTIES 44: LINK_FLAGS -Wl,--no-as-needed) 45 endif()
examples/connext_dds/dynamic_data_nested_structs/c++/CMakeLists.txt: 43 PROPERTIES 44: LINK_FLAGS -Wl,--no-as-needed) 45 endif()
examples/connext_dds/dynamic_data_nested_structs/c++03/CMakeLists.txt: 43 PROPERTIES 44: LINK_FLAGS -Wl,--no-as-needed) 45 endif()
examples/connext_dds/dynamic_data_sequences/c/CMakeLists.txt: 43 PROPERTIES 44: LINK_FLAGS -Wl,--no-as-needed) 45 endif()
examples/connext_dds/dynamic_data_sequences/c++/CMakeLists.txt: 43 PROPERTIES 44: LINK_FLAGS -Wl,--no-as-needed) 45 endif()
examples/connext_dds/dynamic_data_sequences/c++03/CMakeLists.txt: 43 PROPERTIES 44: LINK_FLAGS -Wl,--no-as-needed) 45 endif()
Suggested solutions
As the distributed logger component is included in the top-level CMakeLists.txt, we need to check whether the version is greater than 6.1.0, to filter them out. See comment
The problem is that it will not be possible to build those examples as standalone. The -Wl,--no-as-needed are added because we are enabling the distributed_logger component at the top level CMakeLists.txt. So, it is not a good idea to remove them (probably, since those flags are not needed from 6.1.0, we can add or not them depending on the ConnextDDS version)