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

cleanup: don't use active_class_loaders_[library_path] for existence test #35

Merged
merged 3 commits into from
May 17, 2016

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Apr 3, 2016

  • use find instead of active_class_loaders_[library_path] for existence test
  • the latter was accumulating map entries with NULL pointers
  • fixing it, allows some cleanup

…test

- this accumulates map entries with NULL pointer
- fixing it, allows some cleanup
@mikaelarguedas
Copy link
Member

looks good to me.
@dirk-thomas any comment on this ?

@@ -37,7 +37,8 @@ set(${PROJECT_NAME}_SRCS
src/meta_object.cpp
src/multi_library_class_loader.cpp
)
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS})
file(GLOB ${PROJECT_NAME}_HDRS "include/${PROJECT_NAME}/*.h") # allow headers to be shown in CodeBlocks/QtCreator
Copy link
Member

Choose a reason for hiding this comment

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

Globbing source files in CMake is discouraged: https://cmake.org/cmake/help/v3.5/command/file.html?highlight=glob#file

We do not recommend using GLOB to collect a list of source files from your source tree. If no CMakeLists.txt file changes when a source is added or removed then the generated build system cannot know when to ask CMake to regenerate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know. However, finding the headers is not functionally relevant here (dependency analysis will be performed by make).
It only helps some IDEs like CodeBlocks and QtCreator to list all headers of the project too. And for that purpose globbing is perfect. One doesn't need to care about it anymore ;-)

Copy link
Member

Choose a reason for hiding this comment

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

I'd advocate not to do it here given that no other package in the codebase aggregates headers globally for IDE purposes.

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 will list all headers explicitly then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

@mikaelarguedas
Copy link
Member

@ros-pull-request-builder could you retest this please?

@mikaelarguedas mikaelarguedas merged commit 89cfbe5 into ros:indigo-devel May 17, 2016
@rhaschke rhaschke deleted the cleanup branch July 6, 2016 06:45
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