Apply CMake best practices and remove stale references#1416
Open
bmehta001 wants to merge 6 commits intomicrosoft:mainfrom
Open
Apply CMake best practices and remove stale references#1416bmehta001 wants to merge 6 commits intomicrosoft:mainfrom
bmehta001 wants to merge 6 commits intomicrosoft:mainfrom
Conversation
34e4948 to
790fdd0
Compare
9a5a166 to
2feeb94
Compare
lalitb
reviewed
Mar 21, 2026
lalitb
reviewed
Mar 21, 2026
lalitb
reviewed
Mar 21, 2026
lalitb
reviewed
Mar 21, 2026
lalitb
reviewed
Mar 21, 2026
ThomsonTan
reviewed
Mar 21, 2026
ThomsonTan
reviewed
Mar 21, 2026
Contributor
ThomsonTan
left a comment
There was a problem hiding this comment.
As a general suggestion, consider moving the cleanup changes into a separate PR to streamline the review process, reduce cognitive load, and accelerate merging by isolating functional changes from refactoring.
Contributor
e303041 to
9a91839
Compare
dc4da4f to
83ac9bd
Compare
- Modernize CMakeLists.txt: flatten nesting, deduplicate, use consistent quoting and variable patterns - Remove stale header references from vcxproj and vcxitems files - Simplify test CMakeLists.txt files - Fix CMake conventions in packaging scripts Co-authored-by: Copilot <[email protected]>
65fc991 to
0fe40ec
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Build/project cleanup focused on improving CMake hygiene and removing stale Visual Studio project references, while modernizing toolset selection for newer VS installs.
Changes:
- Standardize CMake logging to
message(STATUS ...), improveif(EXISTS ...)quoting, and simplify test-data copying viaconfigure_file(... COPYONLY). - Update SDK build version prefixing (
MATSDK_API_VERSIONto3.10) and remove stale/commented build logic. - Remove references to deleted headers/sources from multiple
.vcxproj/.vcxitemsfiles and adjust MSBuild toolset selection defaults.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| CMakeLists.txt | CMake best-practices cleanup (languages, STATUS messages), version bump, removes stale blocks/comments |
| lib/CMakeLists.txt | Consistent STATUS messages, quoted EXISTS checks, fix message(FATAL_ERROR ...) syntax |
| tools/ParseOsRelease.cmake | Quote EXISTS path; switch to message(STATUS ...) |
| tools/MakeTgz.cmake | Switch packaging output to message(STATUS ...) |
| tools/MakeDeb.cmake | Switch packaging output to message(STATUS ...) |
| tools/MakeRpm.cmake | Switch packaging output to message(STATUS ...) |
| tests/unittests/CMakeLists.txt | STATUS messages + quoting in EXISTS checks for optional test sources |
| tests/functests/CMakeLists.txt | STATUS messages, quoting in EXISTS checks, simplify test.json copy logic |
| tests/unittests/UnitTests.vcxproj | Remove stale project item reference to a non-existent test file |
| tests/functests/FuncTests.vcxproj | Remove stale header reference from project items |
| tests/functests/FuncTests.vcxproj.filters | Remove stale header reference from filters list |
| lib/shared/Shared.vcxitems | Remove stale header include from shared items |
| lib/shared/Shared.vcxitems.filters | Remove stale header include from shared items filters |
| examples/cpp/SampleCpp/SampleCpp.vcxproj | Remove stale targetver.h reference |
| examples/cpp/SampleCpp/SampleCpp.vcxproj.filters | Remove stale targetver.h reference from filters |
| examples/cpp/SampleCppMini/SampleCppMini.vcxproj | Remove stale targetver.h reference |
| examples/cpp/SampleCppMini/SampleCppMini.vcxproj.filters | Remove stale targetver.h reference from filters |
| Solutions/build.MIP.props | Switch toolset selection to default toolset variable |
| Solutions/before.targets | Update toolset fallback behavior to prefer default toolset variable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keep the before.targets toolset selection deterministic on newer Visual Studio hosts, but only set the MIP props fallback when a consumer has not already chosen a toolset. While addressing the MSBuild review comments, also point the optional module test conditions and source paths at the real lib/modules locations and use CPACK_PACKAGE_FILE_NAME for the RPM status message. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pure build/project cleanup
CMake improvements (3 files)
Cleanup / CMake hygiene
LANGUAGES C CXXto the top-levelproject()callmessage(STATUS ...)instead of baremessage(...)message(FATAL_ERROR, ...)comma bug (invalid CMake syntax)if(EXISTS ...)quoting inlib/,tests/functests/, andtests/unittestsconfigure_file(... COPYONLY)Solutions/before.targetsandSolutions/build.MIP.propsMATSDK_API_VERSIONfrom 3.4 to 3.10 to match recent releases-fPICflags preservedinclude_directoriesentryVisual Studio project cleanup (8 files)
targetver.h(SampleCpp, SampleCppMini)LogManagerV1.hpp(Shared.vcxitems)MockILocalStorageReader.hpp(UnitTests.vcxproj)SanitizerBaseTests.cpp(FuncTests.vcxproj)Packaging