Skip to content

add support for vcxproj ExcludedFromBuild - #8771

Open
IOBYTE wants to merge 3 commits into
cppcheck-opensource:mainfrom
IOBYTE:main
Open

add support for vcxproj ExcludedFromBuild#8771
IOBYTE wants to merge 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.

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