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

fixed #12666 - got rid of ill-conceived USE_MATCHCOMPILER CMake option validation #6348

Merged
merged 1 commit into from
May 3, 2024

Conversation

firewave
Copy link
Collaborator

I went quite overboard when I introduced the validation of the define. That was not necessary in CMake as we provide feedback on the usage of the matchcompiler. So only handle the special options and otherwise rely on the regular CMake logic.

…ion validation

I went quite overboard when I introduced the validation of the define. That was not necessary in CMake as we provide feedback on the usage of the matchcompiler. So only handle the special options and otherwise rely on the regular CMake logic.
@firewave
Copy link
Collaborator Author

@gzzi @c72578 please have a look

Sorry for the inconvenience and the delay in the fix. Will also provide a backport.

@c72578
Copy link
Contributor

c72578 commented Apr 27, 2024

@firewave I did some tests with the attached patch (for 2.14.0):
6348_2.14.0.patch

It accepts ON, On, 1, yes:

-DUSE_MATCHCOMPILER=ON
Output:
-- USE_MATCHCOMPILER =     ON
-- USE_MATCHCOMPILER_OPT = On

-DUSE_MATCHCOMPILER=On
Output:
-- USE_MATCHCOMPILER =     On
-- USE_MATCHCOMPILER_OPT = On

-DUSE_MATCHCOMPILER=1
Output:
-- USE_MATCHCOMPILER =     1
-- USE_MATCHCOMPILER_OPT = On

-DUSE_MATCHCOMPILER=yes
Output:
-- USE_MATCHCOMPILER =     yes
-- USE_MATCHCOMPILER_OPT = On

@firewave
Copy link
Collaborator Author

It accepts ON, On, 1, yes:

Yes - it now just uses the CMake logic: https://cmake.org/cmake/help/latest/command/if.html#constant (actually it is a variable but constant has the list of true/false definitions).

Copy link
Owner

@danmar danmar left a comment

Choose a reason for hiding this comment

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

lgtm

@firewave firewave merged commit c4be14d into danmar:main May 3, 2024
64 checks passed
@firewave firewave deleted the mc-cmake branch May 3, 2024 14:09
firewave added a commit to firewave/cppcheck that referenced this pull request May 3, 2024
…ion validation (danmar#6348)

I went quite overboard when I introduced the validation of the define.
That was not necessary in CMake as we provide feedback on the usage of
the matchcompiler. So only handle the special options and otherwise rely
on the regular CMake logic.

(cherry picked from commit c4be14d)
@firewave
Copy link
Collaborator Author

firewave commented May 3, 2024

Backport in #6377.

firewave added a commit that referenced this pull request May 3, 2024
…ion validation (#6348) (#6377)

I went quite overboard when I introduced the validation of the define.
That was not necessary in CMake as we provide feedback on the usage of
the matchcompiler. So only handle the special options and otherwise rely
on the regular CMake logic.

(cherry picked from commit c4be14d)
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