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

Allow prevent prescan to be re-entrant #2058

Merged
merged 1 commit into from
May 31, 2023
Merged

Allow prevent prescan to be re-entrant #2058

merged 1 commit into from
May 31, 2023

Conversation

LeStarch
Copy link
Collaborator

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s)
Has Unit Tests (y/n)
Builds Without Errors (y/n)
Unit Tests Pass (y/n)
Documentation Included (y/n)

Change Description

Prevent prescan fails when the library has already been defined. This is normally not an issue, but affects some edge-cases. This allows users to avoid a nasty if-tree when using prevent-prescan.

It fixes the problem shown here where normal target creation can be safe, but not so with prevent-prescan.

prevent_prescan(T1 T2)

if (NOT TARGET T1)
   add_library(T1)
endif()


if (NOT TARGET T2)
   add_library(T2)
endif()

Prevent prescan fails when the library has already been defined. This is normally not an issue, but affects some edge-cases.  This allows users to avoid a nasty if-tree when using prevent-prescan.
@LeStarch LeStarch requested a review from timcanham May 31, 2023 19:30
@LeStarch LeStarch merged commit a17badf into devel May 31, 2023
Boehm-Michael pushed a commit to Boehm-Michael/fprime that referenced this pull request Jun 22, 2023
Prevent prescan fails when the library has already been defined. This is normally not an issue, but affects some edge-cases.  This allows users to avoid a nasty if-tree when using prevent-prescan.
thomas-bc pushed a commit that referenced this pull request Aug 4, 2023
Prevent prescan fails when the library has already been defined. This is normally not an issue, but affects some edge-cases.  This allows users to avoid a nasty if-tree when using prevent-prescan.
thomas-bc added a commit that referenced this pull request Aug 4, 2023
@thomas-bc thomas-bc deleted the LeStarch-patch-1 branch August 22, 2023 00:52
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