Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,16 @@ add_custom_target(copy_addons ALL
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/addons"
COMMENT "Copying addons files to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}")

add_custom_target(remove_unsigned_platforms ALL
${CMAKE_COMMAND} -E remove -f
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/platforms/unix32-unsigned.xml"
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/platforms/unix64-unsigned.xml"
COMMENT "Removing unsigned platforms files from ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}")

add_custom_target(copy_platforms ALL
${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/platforms"
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/platforms"
DEPENDS remove_unsigned_platforms
COMMENT "Copying platforms files to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}")

if(USE_BUNDLED_TINYXML2)
Expand Down
12 changes: 0 additions & 12 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1608,18 +1608,6 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
mLogger.printError(errstr);
return Result::Fail;
}

// TODO: remove
// these are loaded via external files and thus have Settings::PlatformFile set instead.
// override the type so they behave like the regular platforms.
if (platform == "unix32-unsigned") {
mSettings.platform.type = Platform::Type::Unix32;
mLogger.printMessage("The platform 'unix32-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix32 --funsigned-char' instead");
}
else if (platform == "unix64-unsigned") {
mSettings.platform.type = Platform::Type::Unix64;
mLogger.printMessage("The platform 'unix64-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix64 --funsigned-char' instead");
}
}

if (defaultSign != '\0')
Expand Down
16 changes: 12 additions & 4 deletions lib/cppcheck.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
del /q "$(OutDir)platforms/unix32-unsigned.xml"
del /q "$(OutDir)platforms/unix64-unsigned.xml"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PCRE|x64'">
Expand Down Expand Up @@ -313,7 +315,9 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
del /q "$(OutDir)platforms/unix32-unsigned.xml"
del /q "$(OutDir)platforms/unix64-unsigned.xml"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand Down Expand Up @@ -354,7 +358,9 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
del /q "$(OutDir)platforms/unix32-unsigned.xml"
del /q "$(OutDir)platforms/unix64-unsigned.xml"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-PCRE|x64'">
Expand Down Expand Up @@ -396,7 +402,9 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
del /q "$(OutDir)platforms/unix32-unsigned.xml"
del /q "$(OutDir)platforms/unix64-unsigned.xml"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
18 changes: 0 additions & 18 deletions platforms/unix32-unsigned.xml

This file was deleted.

18 changes: 0 additions & 18 deletions platforms/unix64-unsigned.xml

This file was deleted.

1 change: 1 addition & 0 deletions releasenotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ Deprecations:
Other:
- Removed deprecated support for builds with Qt5.
- Added make variables `CXXOPTS` and `LDOPTS` to extend existing `CXXFLAGS` and `LDFLAGS`.
- Removed deprecated platforms `unix32-unsigned` and `unix64-unsigned`.
-
10 changes: 4 additions & 6 deletions test/testcmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1766,9 +1766,8 @@ class TestCmdlineParser : public TestFixture {
REDIRECT;
const char * const argv[] = {"cppcheck", "--platform=unix32-unsigned", "file.cpp"};
ASSERT(settings->platform.set(Platform::Type::Unspecified));
ASSERT_EQUALS_ENUM(CmdLineParser::Result::Success, parseFromArgs(argv));
ASSERT_EQUALS(Platform::Type::Unix32, settings->platform.type);
ASSERT_EQUALS("cppcheck: The platform 'unix32-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix32 --funsigned-char' instead\n", logger->str());
ASSERT_EQUALS_ENUM(CmdLineParser::Result::Fail, parseFromArgs(argv));
ASSERT_EQUALS("cppcheck: error: unrecognized platform: 'unix32-unsigned'.\n", logger->str());
}

void platformUnix64() {
Expand All @@ -1783,9 +1782,8 @@ class TestCmdlineParser : public TestFixture {
REDIRECT;
const char * const argv[] = {"cppcheck", "--platform=unix64-unsigned", "file.cpp"};
ASSERT(settings->platform.set(Platform::Type::Unspecified));
ASSERT_EQUALS_ENUM(CmdLineParser::Result::Success, parseFromArgs(argv));
ASSERT_EQUALS(Platform::Type::Unix64, settings->platform.type);
ASSERT_EQUALS("cppcheck: The platform 'unix64-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix64 --funsigned-char' instead\n", logger->str());
ASSERT_EQUALS_ENUM(CmdLineParser::Result::Fail, parseFromArgs(argv));
ASSERT_EQUALS("cppcheck: error: unrecognized platform: 'unix64-unsigned'.\n", logger->str());
}

void platformNative() {
Expand Down
2 changes: 0 additions & 2 deletions win_installer/cppcheck.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@
<File Id='mips32.xml' Name='mips32.xml' Source='$(var.PtfsDir)\mips32.xml' />
<File Id='cray_sv1.xml' Name='cray_sv1.xml' Source='$(var.PtfsDir)\cray_sv1.xml' />
<File Id='msp430_eabi_large_datamodel.xml' Name='msp430_eabi_large_datamodel.xml' Source='$(var.PtfsDir)\msp430_eabi_large_datamodel.xml' />
<File Id='unix32unsigned.xml' Name='unix32-unsigned.xml' Source='$(var.PtfsDir)\unix32-unsigned.xml' />
<File Id='unix64unsigned.xml' Name='unix64-unsigned.xml' Source='$(var.PtfsDir)\unix64-unsigned.xml' />
</Component>
</Directory>
<Directory Id='AddonsFolder' Name='addons'>
Expand Down