Skip to content

Allow overridde CMAKE_CXX_* variables and fix overridde CMAKE_C_*#1787

Merged
Dead2 merged 2 commits intozlib-ng:developfrom
phprus:issue-1785
Sep 18, 2024
Merged

Allow overridde CMAKE_CXX_* variables and fix overridde CMAKE_C_*#1787
Dead2 merged 2 commits intozlib-ng:developfrom
phprus:issue-1785

Conversation

@phprus
Copy link
Copy Markdown
Contributor

@phprus phprus commented Sep 17, 2024

Fix for issue #1785

Allow overridde CMAKE_CXX_*.
Define CMAKE_C_* variables only if it is not defined instead of if it are False.

…E_CXX_EXTENSIONS variables for tests and benchmarks.

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
…TENSIONS. False value is allowed for CMAKE_C_STANDARD_REQUIRED and CMAKE_C_EXTENSIONS.

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Copy link
Copy Markdown
Member

@nmoinvaz nmoinvaz left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.28%. Comparing base (c939498) to head (c535755).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1787      +/-   ##
===========================================
- Coverage    33.39%   33.28%   -0.11%     
===========================================
  Files           66       66              
  Lines         5504     5504              
  Branches      1227     1227              
===========================================
- Hits          1838     1832       -6     
  Misses        3418     3418              
- Partials       248      254       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Dead2 Dead2 merged commit efca012 into zlib-ng:develop Sep 18, 2024
@FantasqueX
Copy link
Copy Markdown
Contributor

Hi, thanks for your work. I can build zlib-ng successfully on ArchLinux. However, I cannot build it successfully on OpenSUSE Tumbleweed. ArchLinux's gtest package contains

gtest /usr/lib/cmake/GTest/GTestConfig.cmake
gtest /usr/lib/cmake/GTest/GTestConfigVersion.cmake
gtest /usr/lib/cmake/GTest/GTestTargets-none.cmake
gtest /usr/lib/cmake/GTest/GTestTargets.cmake

while OpenSUSE Tumbleweed doesn't. On OpenSUSE, CMake finds gtest by MODULE which doesn't define CMAKE_CXX_STANDARD.

@mtl1979
Copy link
Copy Markdown
Collaborator

mtl1979 commented Nov 24, 2024

@FantasqueX Finding by module is deprecated, so the issue should be reported to OpenSuSE packager.

@FantasqueX
Copy link
Copy Markdown
Contributor

I have issued a bug report to OpenSUSE https://bugzilla.opensuse.org/show_bug.cgi?id=1232917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants