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

Remove all uses of IDYNTREE_TREE_INCLUDE_DIRS global variable #618

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Jan 8, 2020

The IDYNTREE_TREE_INCLUDE_DIRS global variable dates back to CMake 2.8.7,
when the "modern CMake" propagation of include usage requiremements via
target_include_directories was not available, and the main author of iDynTree's CMake scripts
had quite a limited understanding of CMake in general.

It used to contain all the include directories of iDynTree, but not it is not
necessary. The only place in which it was still useful was:

  • Passing the include directories to SWIG. For this, now all the idyntree targets
    are inspected and the appropriate include directories are extracted from the
    target-specific INTERFACE_INCLUDE_DIRECTORIES properties.
  • Passing to tests the location of the testModels.h header that contains the location
    of test model files. This usage has been substitute with a new HEADER library idyntree-testmodels,
    that is linked in all tests that need to use the testModels.h header.

The IDYNTREE_TREE_INCLUDE_DIRS global variable dates back to CMake 2.8.7,
when the "modern CMake" propagation of include usage requiremements via
target_include_directories was not available, and one of the main iDynTree
authors had quite a limited understanding of CMake in general.

It used to contain all the include directories of iDynTree, but not it is not
necessary. The only place in which it was still useful was:
* Passing the include directories to SWIG. For this, now all the idyntree targets
  are inspected and the appropriate include directories are extracted from the
  target-specific INTERFACE_INCLUDE_DIRECTORIES properties.
* Passing to tests the location of the testModels.h header that contains the location
  of test model files. This usage has been substitute with a new HEADER library idyntree-testmodels,
  that is linked in all tests that need to use the testModels.h header.
@traversaro traversaro merged commit 6a2de32 into devel Jan 9, 2020
@traversaro traversaro deleted the cleanup/include-dirs branch January 9, 2020 08:39
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.

2 participants