Skip to content

add support for vcxproj ExcludedFromBuild - #8771

Merged
IOBYTE merged 3 commits into
cppcheck-opensource:mainfrom
IOBYTE:main
Aug 4, 2026
Merged

add support for vcxproj ExcludedFromBuild#8771
IOBYTE merged 3 commits into
cppcheck-opensource:mainfrom
IOBYTE:main

Conversation

@IOBYTE

@IOBYTE IOBYTE commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

CMake generates a vcxproj file for the cppcheck GUI that has generated files for all configurations but adds ExcludedFromBuild so the files only gets compiled for a specific configuration.

<ClCompile Include="C:\Users\Bob\forks\cppcheck\build\gui\cppcheck-gui_autogen\mocs_compilation_Debug.cpp">
  <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
  <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</ExcludedFromBuild>
  <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</ExcludedFromBuild>
</ClCompile>

This patch adds support for ExcludedFromBuild so a file only gets checked for a specific configuration.

@IOBYTE
IOBYTE requested review from danmar and firewave August 2, 2026 15:35
@danmar

danmar commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

please fix CI

@danmar danmar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

code looks good to me so far.

@IOBYTE

IOBYTE commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

Sorry. That workflow doesn't run by default. Still learning.

@IOBYTE
IOBYTE merged commit 9408a1d into cppcheck-opensource:main Aug 4, 2026
70 checks passed
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.

2 participants