Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions FindStarling.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ include("GenericFindDependency")
option(starling_ENABLE_TESTS "" OFF)
option(starling_ENABLE_EXAMPLES "" OFF)
GenericFindDependency(
TARGET starling
SYSTEM_HEADER_FILE "starling/starling.h"
TARGET pvt-runner-lib
SOURCE_DIR starling
SYSTEM_HEADER_FILE "pvt_driver/runner/pvt_runner.h"
SYSTEM_INCLUDES
)
)

mark_target_as_system_includes(sensorfusion)
mark_target_as_system_includes(pvt_driver)
mark_target_as_system_includes(pvt-engine)
mark_target_as_system_includes(pvt-common)
mark_target_as_system_includes(starling-util)
Comment on lines +11 to +15
Copy link
Contributor

Choose a reason for hiding this comment

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

should these check to make sure that the targets exists before marking them? if (TARGET sensorfusion) ... endif(), on the off chance that we might rename/remove some of these targets in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like mark_target_as_system_includes will silently do nothing if the targets don't exist.

Are you thinking that we should be failing or giving a warning if the targets don't exist?

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't expect that behaviour of the mark_target_as_system_includes function (sorry didn't dig to deep into it). I'd probably go with a warning, mostly because cmake is an external library library.

Copy link
Contributor

Choose a reason for hiding this comment

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

my comment is really just a nit. I'll leave matt to approve the request since he knows this portion of the cmake work inside out. I don't see any isssues with this PR, I'm happy to approve.