Skip to content
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

Removed OPENDDS_FILENAME_ONLY_INCLUDES setting which is deprecated. #24

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

doug1234
Copy link
Contributor

No description provided.

@doug1234
Copy link
Contributor Author

doug1234 commented Mar 4, 2024

Any chance this review can get moved along?

@iguessthislldo
Copy link
Member

Tried this out, but ran into issues with the test I came up with that I'm trying to resolve in OpenDDS/OpenDDS#4489.

openddw-config.in.cmake Outdated Show resolved Hide resolved
@iguessthislldo
Copy link
Member

iguessthislldo commented Mar 5, 2024

It is gone now. Did that fix your test?

OPENDDS_ALLOW_ENV_CHANGE doesn't do anything, it was just an observation I made last week.

The test I've been using is the client-server one, but I changed it so it has two IDL files:

example.idl
test_data/test_data.idl
idl2library(IDLS example.idl test_data/test_data.idl)

This is to test that INCLUDE_BASE can work properly in this situation. It tries to properly handle the directory structure of the IDL files as opposed to OPENDDS_FILENAME_ONLY_INCLUDES which worked around the issue completely.

I ran into 2 issues:

  1. Logic for dealing with INCLUDE_BASE and the generated export header for shared libraries broke because of how they interacted wasn't fully fleshed out. I have fixed that in Make Generated Output in CMake More Robust OpenDDS#4489. I also was able to improve the overall logic of INCLUDE_BASE.

  2. As I guessed INCLUDE_BASE ${${current_idl_target}_ABSDIR} assumes a flat directory structure that causes the build to fail:

    /home/fred/work/OpenDDW/OpenDDW/build/example/opendds_generated/exampleC.h:68:10: fatal error: test_data/test_dataC.h: No such file or directory
       68 | #include "test_data/test_dataC.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    

    Changing INCLUDE_BASE to ${CMAKE_CURRENT_SOURCE_DIR} does fix the issue.

@doug1234
Copy link
Contributor Author

doug1234 commented Mar 6, 2024

I think I understand what you are saying is the problem. But what do you propose we do to solve it? Are you going to make another opendds change to fix issue 2?

@@ -185,6 +182,7 @@ function(idl2library)
${${current_idl_target}_RELPATH}
OPENDDS_IDL_OPTIONS ${current_idl_include_opts}
TAO_IDL_OPTIONS ${current_idl_include_opts}
INCLUDE_BASE ${${current_idl_target}_ABSDIR}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand what you are saying is the problem. But what do you propose we do to solve it? Are you going to make another opendds change to fix issue 2?

No, 2 is a decision that has to be made in OpenDDW here:

Suggested change
INCLUDE_BASE ${${current_idl_target}_ABSDIR}
INCLUDE_BASE "${CMAKE_CURRENT_SOURCE_DIR}"

That's the change that was needed for my example, but what this needs to be depends on how the IDL is organized. My IDL was in different directories because that's how I test INCLUDE_BASE, but INCLUDE_BASE ${${current_idl_target}_ABSDIR} would only work if all the IDL is all in the same directory. I guess what really matters is does INCLUDE_BASE ${${current_idl_target}_ABSDIR} work for all your IDL? If so then how this is now is probably okay, and we can merge this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I think I understand better. Lets look at this from a bit different angle: The goal of this PR is to have it work the same as it did before without the warning messages. Have we achieved that? We can look into making it better in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will probably work the same, but that really depends on the IDL. Have you tested with all your IDL?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I have tested it with both our project and our examples.

@jrw972 jrw972 merged commit c21d491 into OpenDDS:master Mar 7, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants