-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for QNX 7.1 build #3360
Conversation
d5f9bda
to
c58675e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thanks for all the work done on putting this PR together.
Other than the suggestions and questions already in the relevant files I have some concerns regarding the extensive Makefile usage. Is it required? On the common.mk file it seems like it ends up building all components in the standard CMake way. Also, a user that downloads the repository may be confused by a top level Makefile that fails due to a missing file (since recurse.mk is a QNX feature).
.gitignore
Outdated
build_fast-dds/ | ||
build_fastcdr/ | ||
build_foonathan_memory/ | ||
build_googletest/ | ||
build_tinyxml2/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have this object folders inside the standard build folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
CMakeLists.txt
Outdated
@@ -549,6 +567,45 @@ if(INSTALL_TOOLS) | |||
) | |||
endif() | |||
|
|||
if(COMPILE_EXAMPLES AND QNX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to keep this in line with the rest of the logic. COMPILE_EXAMPLES builds, INSTALL_EXAMPLES moves them to the proper place.
Probably is also a good idea to nest it inside the already existing INSTALL_EXAMPLES check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Done.
CMakeLists.txt
Outdated
if(EPROSIMA_BUILD_TESTS AND QNX) | ||
install(DIRECTORY ${PROJECT_BINARY_DIR}/test/ | ||
DESTINATION bin/Fast-DDS_test | ||
PATTERN "*.cmake" EXCLUDE | ||
PATTERN "*.d" EXCLUDE | ||
PATTERN "*.dir" EXCLUDE | ||
PATTERN "*.internal" EXCLUDE | ||
PATTERN "*.make" EXCLUDE | ||
PATTERN "*.marks" EXCLUDE | ||
PATTERN "*.o" EXCLUDE | ||
PATTERN "*.ts" EXCLUDE | ||
PATTERN "*.txt" EXCLUDE | ||
PATTERN "CMakeFiles" EXCLUDE | ||
PATTERN "Makefile" EXCLUDE | ||
PATTERN "cmake" EXCLUDE | ||
) | ||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/test/certs | ||
DESTINATION bin/Fast-DDS_test | ||
) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically ctest
runs the test binaries from the build directory. Why do you need to install them explicitly?
Also, this should be moved to the CMakeLists.txt inside the test
subfolder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I install them directly because the test binaries compiled for QNX can only be run on QNX targets, not on your Ubuntu build machine.
I moved it to the CMakeLists.txt inside the test subfolder.
versions.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New commits on master
branch are causing conflicts here. Please rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch should be its own PR on the foonathan_memory_vendor repository since we are already doing some patching there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a PR on the foonathan_memory_vendor.
8cad29e
to
8cf397f
Compare
Thank you for the feedback @jsantiago-eProsima. Yes, the Makefiles are required because that is how QNX builds work. I moved all QNX related build files under build_qnx so that users would not be confused. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look great, thank you. Just a small nitpick that I didn't catch on the first pass left.
Also, it would be really helpful if you could make a Pull Request to Fast DDS' documentation repository detailing the build procedure so it can be referenced there instead of in a Pull Request.
GTest::gmock | ||
${CMAKE_DL_LIBS}) | ||
add_gtest(RTPSWriterTests SOURCES ${RTPSWRITERTESTS_SOURCE}) | ||
if(NOT QNX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nitpick. Since we no longer need to build the RTPSWriterTests due to the WillOnce issue, better to move this before the set(RTPSWRITERTESTS_SOURCE RTPSWriterTests.cpp)
b6a8835
to
38c4ca6
Compare
Thanks @jsantiago-eProsima . That sounds good. I will start to work on documenting the build procedure. Once I am done, I will submit a PR on the documentation repository. |
d2e86fc
to
c49f53d
Compare
Hello @jsantiago-eProsima, I opened a PR which adds instructions for building. Thanks. |
Signed-off-by: James Choi <chachoi@blackberry.com>
@richiprosima please test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with green CI
Failing test is unrelated. |
Description
This PR adds necessary changes which will allow Fast-DDS to build with QNX 7.1:
Build instructions for QNX 7.1:
Libraries will be installed to
${QNX_TARGET}/${CPUVARDIR}/usr/lib
.To build examples and tests, change
-DEPROSIMA_BUILD_TESTS=OFF
and-DCOMPILE_EXAMPLES=OFF
in common.mk to-DEPROSIMA_BUILD_TESTS=ON
and-DCOMPILE_EXAMPLES=ON
.Examples will be installed to
${QNX_TARGET}/${CPUVARDIR}/usr/bin/Fast-DDS_examples
.Tests will be installed to
${QNX_TARGET}/${CPUVARDIR}/usr/bin/Fast-DDS_test
.Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist