Modernize CMakeLists.txt for inifile-cpp#48
Open
abin-z wants to merge 8 commits intoRookfighter:mainfrom
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
==========================================
- Coverage 93.84% 93.40% -0.44%
==========================================
Files 1 1
Lines 341 288 -53
==========================================
- Hits 320 269 -51
+ Misses 21 19 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernize CMakeLists.txt for inifile-cpp
This PR updates the CMakeLists.txt to a more modern, target-oriented CMake style while keeping the previous functionality intact.
Main changes
Modern CMake targets
inicppis now anINTERFACElibrary with propertarget_compile_features.C++ standard
cxx_std_11declared viatarget_compile_features.CMAKE_CXX_STANDARD) for cleaner builds.Option naming
INIFILE_CPP_to avoid global conflicts:INIFILE_CPP_GENERATE_COVERAGEINIFILE_CPP_BUILD_TESTSINIFILE_CPP_BUILD_EXAMPLESCoverage
add_subdirectory.Tests and examples
Install
GNUInstallDirsfor portable installation paths.include/directory rather than a single file.Benefits
Modern CMake: https://cliutils.gitlab.io/modern-cmake/README.html