Fixed Visual Studio build after pathmatch.h/cpp was moved to lib, fixed compiler errors about getcwd
This commit is contained in:
parent
fff8aa8590
commit
29e1fe136a
|
@ -385,7 +385,6 @@
|
||||||
<ClInclude Include="cmdlineparser.h" />
|
<ClInclude Include="cmdlineparser.h" />
|
||||||
<ClInclude Include="cppcheckexecutor.h" />
|
<ClInclude Include="cppcheckexecutor.h" />
|
||||||
<ClInclude Include="filelister.h" />
|
<ClInclude Include="filelister.h" />
|
||||||
<ClInclude Include="pathmatch.h" />
|
|
||||||
<ClInclude Include="threadexecutor.h" />
|
<ClInclude Include="threadexecutor.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -398,7 +397,6 @@
|
||||||
<ClCompile Include="cppcheckexecutor.cpp" />
|
<ClCompile Include="cppcheckexecutor.cpp" />
|
||||||
<ClCompile Include="filelister.cpp" />
|
<ClCompile Include="filelister.cpp" />
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
<ClCompile Include="pathmatch.cpp" />
|
|
||||||
<ClCompile Include="threadexecutor.cpp" />
|
<ClCompile Include="threadexecutor.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
|
|
@ -29,17 +29,11 @@
|
||||||
<ClInclude Include="filelister.h">
|
<ClInclude Include="filelister.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="pathmatch.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="main.cpp">
|
<ClCompile Include="main.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="pathmatch.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="threadexecutor.cpp">
|
<ClCompile Include="threadexecutor.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
|
@ -78,6 +78,7 @@
|
||||||
<ClCompile Include="library.cpp" />
|
<ClCompile Include="library.cpp" />
|
||||||
<ClCompile Include="mathlib.cpp" />
|
<ClCompile Include="mathlib.cpp" />
|
||||||
<ClCompile Include="path.cpp" />
|
<ClCompile Include="path.cpp" />
|
||||||
|
<ClCompile Include="pathmatch.cpp" />
|
||||||
<ClCompile Include="platform.cpp" />
|
<ClCompile Include="platform.cpp" />
|
||||||
<ClCompile Include="preprocessor.cpp" />
|
<ClCompile Include="preprocessor.cpp" />
|
||||||
<ClCompile Include="importproject.cpp" />
|
<ClCompile Include="importproject.cpp" />
|
||||||
|
@ -127,6 +128,7 @@
|
||||||
<ClInclude Include="library.h" />
|
<ClInclude Include="library.h" />
|
||||||
<ClInclude Include="mathlib.h" />
|
<ClInclude Include="mathlib.h" />
|
||||||
<ClInclude Include="path.h" />
|
<ClInclude Include="path.h" />
|
||||||
|
<ClInclude Include="pathmatch.h" />
|
||||||
<ClInclude Include="platform.h" />
|
<ClInclude Include="platform.h" />
|
||||||
<ClInclude Include="preprocessor.h" />
|
<ClInclude Include="preprocessor.h" />
|
||||||
<ClInclude Include="importproject.h" />
|
<ClInclude Include="importproject.h" />
|
||||||
|
|
|
@ -149,6 +149,9 @@
|
||||||
<ClCompile Include="platform.cpp">
|
<ClCompile Include="platform.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="pathmatch.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="checkbufferoverrun.h">
|
<ClInclude Include="checkbufferoverrun.h">
|
||||||
|
@ -298,6 +301,9 @@
|
||||||
<ClInclude Include="platform.h">
|
<ClInclude Include="platform.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="pathmatch.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="version.rc" />
|
<ResourceCompile Include="version.rc" />
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#else
|
||||||
|
#include <direct.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Is the filesystem case insensitive? */
|
/** Is the filesystem case insensitive? */
|
||||||
|
@ -190,7 +192,11 @@ const std::string Path::getCurrentPath()
|
||||||
{
|
{
|
||||||
char currentPath[4096];
|
char currentPath[4096];
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
if (getcwd(currentPath, 4096) != 0)
|
if (getcwd(currentPath, 4096) != 0)
|
||||||
|
#else
|
||||||
|
if (_getcwd(currentPath, 4096) != 0)
|
||||||
|
#endif
|
||||||
return std::string(currentPath);
|
return std::string(currentPath);
|
||||||
|
|
||||||
return emptyString;
|
return emptyString;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief Simple path matching for ignoring paths in CLI.
|
* @brief Simple path matching for ignoring paths in CLI.
|
||||||
*/
|
*/
|
||||||
class PathMatch {
|
class CPPCHECKLIB PathMatch {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
<ClCompile Include="..\cli\cmdlineparser.cpp" />
|
<ClCompile Include="..\cli\cmdlineparser.cpp" />
|
||||||
<ClCompile Include="..\cli\cppcheckexecutor.cpp" />
|
<ClCompile Include="..\cli\cppcheckexecutor.cpp" />
|
||||||
<ClCompile Include="..\cli\filelister.cpp" />
|
<ClCompile Include="..\cli\filelister.cpp" />
|
||||||
<ClCompile Include="..\cli\pathmatch.cpp" />
|
|
||||||
<ClCompile Include="..\cli\threadexecutor.cpp" />
|
<ClCompile Include="..\cli\threadexecutor.cpp" />
|
||||||
<ClCompile Include="options.cpp" />
|
<ClCompile Include="options.cpp" />
|
||||||
<ClCompile Include="test64bit.cpp" />
|
<ClCompile Include="test64bit.cpp" />
|
||||||
|
@ -94,7 +93,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\cli\cmdlineparser.h" />
|
<ClInclude Include="..\cli\cmdlineparser.h" />
|
||||||
<ClInclude Include="..\cli\filelister.h" />
|
<ClInclude Include="..\cli\filelister.h" />
|
||||||
<ClInclude Include="..\cli\pathmatch.h" />
|
|
||||||
<ClInclude Include="..\cli\threadexecutor.h" />
|
<ClInclude Include="..\cli\threadexecutor.h" />
|
||||||
<ClInclude Include="..\lib\config.h" />
|
<ClInclude Include="..\lib\config.h" />
|
||||||
<ClInclude Include="options.h" />
|
<ClInclude Include="options.h" />
|
||||||
|
|
|
@ -124,9 +124,6 @@
|
||||||
<ClCompile Include="testunusedvar.cpp">
|
<ClCompile Include="testunusedvar.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\cli\pathmatch.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\cli\filelister.cpp">
|
<ClCompile Include="..\cli\filelister.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -216,9 +213,6 @@
|
||||||
<ClInclude Include="testutils.h">
|
<ClInclude Include="testutils.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\cli\pathmatch.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\cli\filelister.h">
|
<ClInclude Include="..\cli\filelister.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
Loading…
Reference in New Issue