mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
767f24aeda
- cleaning up a bit: static helper functions, remove unused scanner profiles, remove unused variables, etc. - correct <name> entry in .project file - converts the make command and other paths obtained from cygwin cmake to windows style paths - provide environment setup for compiling with nmake - create linked resources and path entries for executable/library_output_path's not subdirs of binary path - fixes incorrect exclusions of output dirs when named the same as source dir - excludes the CMakeFiles subdirs from the directories to scan for output targets - removes possible redundant entries in <pathentry include ...> - adds the all and preinstall targets to the target list - removes the linked resources for non out-of-source builds and conflicting dirs Alex
97 lines
3.4 KiB
C++
97 lines
3.4 KiB
C++
/*=========================================================================
|
|
|
|
Program: CMake - Cross-Platform Makefile Generator
|
|
Module: $RCSfile$
|
|
Language: C++
|
|
Date: $Date$
|
|
Version: $Revision$
|
|
|
|
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
|
Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved.
|
|
Copyright (c) 2007 Miguel A. Figueroa-Villanueva. All rights reserved.
|
|
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
PURPOSE. See the above copyright notices for more information.
|
|
|
|
=========================================================================*/
|
|
#ifndef cmExtraEclipseCDT4Generator_h
|
|
#define cmExtraEclipseCDT4Generator_h
|
|
|
|
#include "cmExternalMakefileProjectGenerator.h"
|
|
|
|
class cmMakefile;
|
|
class cmGeneratedFileStream;
|
|
|
|
/** \class cmExtraEclipseCDT4Generator
|
|
* \brief Write Eclipse project files for Makefile based projects
|
|
*
|
|
* This generator is in early alpha stage.
|
|
*/
|
|
class cmExtraEclipseCDT4Generator : public cmExternalMakefileProjectGenerator
|
|
{
|
|
public:
|
|
cmExtraEclipseCDT4Generator();
|
|
|
|
static cmExternalMakefileProjectGenerator* New() {
|
|
return new cmExtraEclipseCDT4Generator;
|
|
}
|
|
|
|
virtual const char* GetName() const {
|
|
return cmExtraEclipseCDT4Generator::GetActualName();
|
|
}
|
|
|
|
static const char* GetActualName() { return "Eclipse CDT4"; }
|
|
|
|
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
|
const char* fullName) const;
|
|
|
|
virtual void SetGlobalGenerator(cmGlobalGenerator* generator);
|
|
|
|
virtual void Generate();
|
|
|
|
private:
|
|
// create .project file
|
|
void CreateProjectFile() const;
|
|
|
|
// create .cproject file
|
|
void CreateCProjectFile() const;
|
|
|
|
// Eclipse supported toolchain types
|
|
enum EclipseToolchainType
|
|
{
|
|
EclipseToolchainOther,
|
|
EclipseToolchainLinux,
|
|
EclipseToolchainCygwin,
|
|
EclipseToolchainMinGW,
|
|
EclipseToolchainSolaris,
|
|
EclipseToolchainMacOSX
|
|
};
|
|
static EclipseToolchainType GetToolChainType(const cmMakefile& makefile);
|
|
|
|
// If built with cygwin cmake, convert posix to windows path.
|
|
static std::string GetEclipsePath(const std::string& path);
|
|
|
|
// Extract basename.
|
|
static std::string GetPathBasename(const std::string& path);
|
|
|
|
// Helper functions
|
|
static void AppendStorageScanners(cmGeneratedFileStream& fout);
|
|
static void AppendTarget (cmGeneratedFileStream& fout,
|
|
const std::string& target,
|
|
const std::string& make);
|
|
static void AppendScannerProfile (cmGeneratedFileStream& fout,
|
|
const std::string& profileID,
|
|
bool openActionEnabled,
|
|
const std::string& openActionFilePath,
|
|
bool pParserEnabled,
|
|
const std::string& scannerInfoProviderID,
|
|
const std::string& runActionArguments,
|
|
const std::string& runActionCommand,
|
|
bool runActionUseDefault,
|
|
bool sipParserEnabled);
|
|
};
|
|
|
|
#endif
|