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

Use SrcDir and absolute paths for improved build reliability and portability. #250

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

stevewgr
Copy link
Member

@stevewgr stevewgr commented Aug 7, 2024

Description

This pull request includes two key changes aimed at improving project maintainability and robustness:

  1. Use SrcDir Instead of SolutionDir:

    • Replaces the usage of the SolutionDir variable with the SrcDir variable.
    • The SolutionDir variable can be problematic when building a specific project directly, especially when passing a .vcxproj file to msbuild instead of a .sln file. In such cases, SolutionDir is undefined and can break the build.
    • Using SrcDir makes the project more portable and resilient to directory relocations.
  2. Replace Relative Paths with Absolute Paths Using SrcDir:

    • Converts all relative paths to absolute paths by leveraging the SrcDir variable.
    • This change enhances project maintenance and ensures better handling of directory relocations.

Benefits

  • Improved Build Reliability: By avoiding the undefined SolutionDir variable, builds are more consistent and less prone to failures when using different project files.
  • Enhanced Portability: Absolute paths with SrcDir make the project structure more robust and adaptable to changes in directory locations.
  • Simplified Maintenance: The use of absolute paths and a consistent directory reference streamlines project upkeep and reduces path-related issues.

SolutionDir can be problematic when building a specific project directly,
as it is undefined when passing a vcxproj file to msbuild instead of a
sln file. This change improves portability by making the build process
more resilient to directory relocations.
This change improves project maintenance and enhances resilience to
directory relocations by standardizing paths with the SrcDir variable.
@stevewgr stevewgr self-assigned this Aug 7, 2024
@stevewgr
Copy link
Member Author

stevewgr commented Aug 7, 2024

@stevewgr stevewgr merged commit 35c0d4d into master Aug 7, 2024
2 checks passed
@stevewgr stevewgr deleted the project-configs branch August 7, 2024 04:43
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.

1 participant