This commit is contained in:
Daniel Marjamäki 2016-08-07 15:45:36 +02:00
parent f83661b206
commit 78fc307c73
5 changed files with 43 additions and 50 deletions

View File

@ -474,6 +474,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
_ignoredPaths.push_back(path);
}
}
// --library
else if (std::strncmp(argv[i], "--library=", 10) == 0) {
if (!CppCheckExecutor::tryLoadLibrary(_settings->library, argv[0], argv[i]+10))

View File

@ -23,7 +23,7 @@
#include <string>
#include <list>
#include "errorlogger.h"
#include "settings.h" // Project::FileSettings
#include "project.h"
#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__)
#define THREADING_MODEL_FORK

View File

@ -1,38 +1,36 @@
/*
* Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2016 Cppcheck team.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
#ifndef platformH
#define platformH
//---------------------------------------------------------------------------
#include <string>
/// @addtogroup Core
/// @{
/**
* @brief This is just a container for general settings so that we don't need
* to pass individual values to functions or constructors now or in the
* future when we might have even more detailed settings.
*/
struct CPPCHECKLIB Platform {
public:
/*
* Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2016 Cppcheck team.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
#ifndef platformH
#define platformH
//---------------------------------------------------------------------------
#include <string>
/// @addtogroup Core
/// @{
/**
* @brief Platform settings
*/
struct CPPCHECKLIB Platform {
public:
Platform();
virtual ~Platform(){}
@ -101,9 +99,9 @@ public:
default:
return "unknown";
}
}
};
/// @}
//---------------------------------------------------------------------------
#endif // platformH
}
};
/// @}
//---------------------------------------------------------------------------
#endif // platformH

View File

@ -32,15 +32,11 @@
/**
* @brief This is just a container for general settings so that we don't need
* to pass individual values to functions or constructors now or in the
* future when we might have even more detailed settings.
* @brief Project settings.
*/
class CPPCHECKLIB Project {
public:
/** File */
/** File settings. Multiple configurations for a file is allowed. */
struct FileSettings {
FileSettings() : platformType(Platform::Unspecified) {}
std::string filename;

View File

@ -19,8 +19,6 @@
#include "settings.h"
#include "preprocessor.h" // Preprocessor
#include "utils.h"
#include "path.h"
#include "tokenlist.h"
#include <fstream>
#include <set>