removed shared lib support

This commit is contained in:
Ken Martin 2002-08-23 16:13:34 -04:00
parent d7f1a49006
commit 499bd45d4d
12 changed files with 74 additions and 105 deletions

View File

@ -1,9 +1,5 @@
CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
IF(WIN32)
SET(BUILD_SHARED_LIBS 1)
ENDIF(WIN32)
SET(SRCS
cmake.cxx
cmakewizard.cxx

View File

@ -34,22 +34,6 @@
#define CM_PLUGIN_EXPORT
#endif
/*=========================================================================*/
/* CM_EXPORT is used by CMake and not by plugins */
/*=========================================================================*/
#ifndef CM_EXPORT
#ifdef _WIN32
#ifdef CMakeLib_EXPORTS
#define CM_EXPORT __declspec( dllexport )
#else
#define CM_EXPORT __declspec( dllimport )
#endif
#else
#define CM_EXPORT
#endif
#endif
/*=========================================================================*/
/* define the different types of cache entries, see cmCacheManager.h for more
information */
@ -99,15 +83,15 @@ extern "C" {
/* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how
information is passed from the InitialPass to FInalPass for commands
that need a FinalPass and need information from the InitialPass */
extern CM_EXPORT void *cmGetClientData(void *info);
extern void *cmGetClientData(void *info);
/* return the summed size in characters of all the arguments */
extern CM_EXPORT int cmGetTotalArgumentSize(int argc, char **argv);
extern int cmGetTotalArgumentSize(int argc, char **argv);
/* free all the memory associated with an argc, argv pair */
extern CM_EXPORT void cmFreeArguments(int argc, char **argv);
extern void cmFreeArguments(int argc, char **argv);
/* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how
information is passed from the InitialPass to FInalPass for commands
that need a FinalPass and need information from the InitialPass */
extern CM_EXPORT void cmSetClientData(void *info, void *cd);
extern void cmSetClientData(void *info, void *cd);
/*=========================================================================*/
/* The following functions all directly map to methods in the cmMakefile
@ -115,11 +99,11 @@ extern "C" {
of these methods take the void * makefile pointer as their first
argument. */
/*=========================================================================*/
extern CM_EXPORT void cmAddCacheDefinition(void *mf, const char* name,
extern void cmAddCacheDefinition(void *mf, const char* name,
const char* value,
const char* doc,
int cachetype);
extern CM_EXPORT void cmAddCustomCommand(void *mf, const char* source,
extern void cmAddCustomCommand(void *mf, const char* source,
const char* command,
int numArgs,
const char **args,
@ -128,53 +112,53 @@ extern "C" {
int numOutputs,
const char **outputs,
const char *target);
extern CM_EXPORT void cmAddDefineFlag(void *mf, const char* definition);
extern CM_EXPORT void cmAddDefinition(void *mf, const char* name,
extern void cmAddDefineFlag(void *mf, const char* definition);
extern void cmAddDefinition(void *mf, const char* name,
const char* value);
extern CM_EXPORT void cmAddExecutable(void *mf, const char *exename,
extern void cmAddExecutable(void *mf, const char *exename,
int numSrcs, const char **srcs,
int win32);
extern CM_EXPORT void cmAddLibrary(void *mf, const char *libname,
extern void cmAddLibrary(void *mf, const char *libname,
int shared, int numSrcs,
const char **srcs);
extern CM_EXPORT void cmAddLinkDirectoryForTarget(void *mf,
extern void cmAddLinkDirectoryForTarget(void *mf,
const char *tgt,
const char* d);
extern CM_EXPORT void cmAddLinkLibraryForTarget(void *mf,
extern void cmAddLinkLibraryForTarget(void *mf,
const char *tgt,
const char *libname,
int libtype);
extern CM_EXPORT void cmAddUtilityCommand(void *mf, const char* utilityName,
extern void cmAddUtilityCommand(void *mf, const char* utilityName,
const char *command,
const char *arguments,
int all, int numDepends,
const char **depends,
int numOutputs,
const char **outputs);
extern CM_EXPORT int cmCommandExists(void *mf, const char* name);
extern CM_EXPORT void cmExecuteCommand(void *mf, const char *name,
extern int cmCommandExists(void *mf, const char* name);
extern void cmExecuteCommand(void *mf, const char *name,
int numArgs, const char **args);
extern CM_EXPORT
extern
void cmExpandSourceListArguments(void *mf,int argc, const char **argv,
int *resArgc, char ***resArgv,
unsigned int startArgumentIndex);
extern CM_EXPORT char *cmExpandVariablesInString(void *mf,
extern char *cmExpandVariablesInString(void *mf,
const char *source,
int escapeQuotes,
int atOnly);
extern CM_EXPORT unsigned int cmGetCacheMajorVersion(void *mf);
extern CM_EXPORT unsigned int cmGetCacheMinorVersion(void *mf);
extern CM_EXPORT const char* cmGetCurrentDirectory(void *mf);
extern CM_EXPORT const char* cmGetCurrentOutputDirectory(void *mf);
extern CM_EXPORT const char* cmGetDefinition(void *mf, const char *def);
extern CM_EXPORT const char* cmGetHomeDirectory(void *mf);
extern CM_EXPORT const char* cmGetHomeOutputDirectory(void *mf);
extern CM_EXPORT unsigned int cmGetMajorVersion(void *mf);
extern CM_EXPORT unsigned int cmGetMinorVersion(void *mf);
extern CM_EXPORT const char* cmGetProjectName(void *mf);
extern CM_EXPORT const char* cmGetStartDirectory(void *mf);
extern CM_EXPORT const char* cmGetStartOutputDirectory(void *mf);
extern CM_EXPORT int cmIsOn(void *mf, const char* name);
extern unsigned int cmGetCacheMajorVersion(void *mf);
extern unsigned int cmGetCacheMinorVersion(void *mf);
extern const char* cmGetCurrentDirectory(void *mf);
extern const char* cmGetCurrentOutputDirectory(void *mf);
extern const char* cmGetDefinition(void *mf, const char *def);
extern const char* cmGetHomeDirectory(void *mf);
extern const char* cmGetHomeOutputDirectory(void *mf);
extern unsigned int cmGetMajorVersion(void *mf);
extern unsigned int cmGetMinorVersion(void *mf);
extern const char* cmGetProjectName(void *mf);
extern const char* cmGetStartDirectory(void *mf);
extern const char* cmGetStartOutputDirectory(void *mf);
extern int cmIsOn(void *mf, const char* name);
/*=========================================================================*/
@ -182,25 +166,25 @@ extern "C" {
cmSourceFiles. Please see cmSourceFile.h for additional information on many
of these methods. Some of these methods are in cmMakefile.h. */
/*=========================================================================*/
extern CM_EXPORT void *cmAddSource(void *mf, void *sf);
extern CM_EXPORT void *cmCreateSourceFile();
extern CM_EXPORT void *cmGetSource(void *mf, const char* sourceName);
extern CM_EXPORT void cmSourceFileAddDepend(void *sf, const char *depend);
extern CM_EXPORT const char *cmSourceFileGetProperty(void *sf,
extern void *cmAddSource(void *mf, void *sf);
extern void *cmCreateSourceFile();
extern void *cmGetSource(void *mf, const char* sourceName);
extern void cmSourceFileAddDepend(void *sf, const char *depend);
extern const char *cmSourceFileGetProperty(void *sf,
const char *prop);
extern CM_EXPORT int cmSourceFileGetPropertyAsBool(void *sf,
extern int cmSourceFileGetPropertyAsBool(void *sf,
const char *prop);
extern CM_EXPORT const char *cmSourceFileGetSourceName(void *sf);
extern CM_EXPORT
extern const char *cmSourceFileGetSourceName(void *sf);
extern
void cmSourceFileSetName(void *sf, const char* name, const char* dir,
int numSourceExtensions,
const char **sourceExtensions,
int numHeaderExtensions,
const char **headerExtensions);
extern CM_EXPORT
extern
void cmSourceFileSetName2(void *sf, const char* name, const char* dir,
const char *ext, int headerFileOnly);
extern CM_EXPORT void cmSourceFileSetProperty(void *sf, const char *prop,
extern void cmSourceFileSetProperty(void *sf, const char *prop,
const char *value);
@ -208,10 +192,10 @@ extern "C" {
/* the following methods are from cmSystemTools.h see that file for
specific documentaiton on each method. */
/*=========================================================================*/
extern CM_EXPORT char *cmCapitalized(const char *);
extern CM_EXPORT void cmCopyFileIfDifferent(const char *f1, const char *f2);
extern CM_EXPORT char *cmGetFilenameWithoutExtension(const char *);
extern CM_EXPORT void cmRemoveFile(const char *f1);
extern char *cmCapitalized(const char *);
extern void cmCopyFileIfDifferent(const char *f1, const char *f2);
extern char *cmGetFilenameWithoutExtension(const char *);
extern void cmRemoveFile(const char *f1);
#ifdef __cplusplus
}

View File

@ -39,9 +39,9 @@ public:
class CacheIterator
{
public:
CM_EXPORT void Begin();
CM_EXPORT bool IsAtEnd();
CM_EXPORT void Next();
void Begin();
bool IsAtEnd();
void Next();
const char *GetName() {
return position->first.c_str(); }
CacheEntry const &GetEntry() {
@ -70,36 +70,36 @@ public:
*/
static CacheEntryType StringToType(const char*);
///! Singleton pattern get instance of the cmCacheManager.
CM_EXPORT static cmCacheManager* GetInstance();
CM_EXPORT static void DeleteInstance();
static cmCacheManager* GetInstance();
static void DeleteInstance();
///! Load a cache for given makefile. Loads from ouput home.
CM_EXPORT bool LoadCache(cmMakefile*);
bool LoadCache(cmMakefile*);
///! Load a cache for given makefile. Loads from path/CMakeCache.txt.
CM_EXPORT bool LoadCache(const char* path);
CM_EXPORT bool LoadCache(const char* path, bool internal);
CM_EXPORT bool LoadCache(const char* path, bool internal,
bool LoadCache(const char* path);
bool LoadCache(const char* path, bool internal);
bool LoadCache(const char* path, bool internal,
std::set<std::string>& excludes,
std::set<std::string>& includes);
///! Save cache for given makefile. Saves to ouput home CMakeCache.txt.
CM_EXPORT bool SaveCache(cmMakefile*) ;
bool SaveCache(cmMakefile*) ;
///! Save cache for given makefile. Saves to ouput path/CMakeCache.txt
CM_EXPORT bool SaveCache(const char* path) ;
bool SaveCache(const char* path) ;
///! Print the cache to a stream
void PrintCache(std::ostream&) const;
///! Get a cache entry object for a key
CM_EXPORT CacheEntry *GetCacheEntry(const char *key);
CacheEntry *GetCacheEntry(const char *key);
CM_EXPORT bool IsAdvanced(const char* key);
bool IsAdvanced(const char* key);
///! Remove an entry from the cache
CM_EXPORT void RemoveCacheEntry(const char* key);
void RemoveCacheEntry(const char* key);
///! Get the number of entries in the cache
CM_EXPORT int GetSize() {
int GetSize() {
return static_cast<int>(m_Cache.size()); }
///! Break up a line like VAR:type="value" into var, type and value

View File

@ -37,17 +37,17 @@ public:
* in that directory. 0 is returned if the directory can not be
* opened, 1 if it is opened.
*/
CM_EXPORT bool Load(const char* dir);
bool Load(const char* dir);
/**
* Return the number of files in the current directory.
*/
CM_EXPORT size_t GetNumberOfFiles() { return m_Files.size();}
size_t GetNumberOfFiles() { return m_Files.size();}
/**
* Return the file at the given index, the indexing is 0 based
*/
CM_EXPORT const char* GetFile(size_t );
const char* GetFile(size_t );
private:
std::vector<std::string> m_Files; // Array of Files

View File

@ -45,8 +45,8 @@ struct cmListFile
class cmListFileCache
{
public:
static CM_EXPORT cmListFileCache* GetInstance();
static CM_EXPORT void ClearCache();
static cmListFileCache* GetInstance();
static void ClearCache();
/** Return the cached version of the given file.

View File

@ -58,12 +58,12 @@ public:
/**
* Construct an empty makefile.
*/
CM_EXPORT cmMakefile();
cmMakefile();
/**
* Destructor.
*/
CM_EXPORT ~cmMakefile();
~cmMakefile();
/**
* Read and parse a CMakeLists.txt file.
@ -415,7 +415,7 @@ public:
* If the variable is not found in this makefile instance, the
* cache is then queried.
*/
CM_EXPORT const char* GetDefinition(const char*) const;
const char* GetDefinition(const char*) const;
/** Test a boolean cache entry to see if it is true or false,
* returns false if no entry defined.
@ -454,7 +454,7 @@ public:
* Dump documentation to a file. If 0 is returned, the
* operation failed.
*/
CM_EXPORT int DumpDocumentationToFile(std::ostream&);
int DumpDocumentationToFile(std::ostream&);
/**
* Expand all defined varibles in the string.

View File

@ -36,9 +36,9 @@ public:
///! Register a generator
static void RegisterGenerator(cmMakefileGenerator*);
///! delete all registered generators, useful for clean up
CM_EXPORT static void UnRegisterGenerators();
static void UnRegisterGenerators();
///! Get the names of the current registered generators
CM_EXPORT static void GetRegisteredGenerators(std::vector<std::string>& names);
static void GetRegisteredGenerators(std::vector<std::string>& names);
///! Get the name for the generator.
virtual const char* GetName() = 0;

View File

@ -176,7 +176,7 @@ const int NSUBEXP = 10;
* the line. It would match "drepa qrepb" in "rep drepa qrepb".
*
*/
class CM_EXPORT cmRegularExpression
class cmRegularExpression
{
public:
/**

View File

@ -21,17 +21,6 @@
#ifndef cmStandardIncludes_h
#define cmStandardIncludes_h
/* CM_EXPORT is used by the plugin API */
#ifdef _WIN32
#ifdef CMakeLib_EXPORTS
#define CM_EXPORT __declspec( dllexport )
#else
#define CM_EXPORT __declspec( dllimport )
#endif
#else
#define CM_EXPORT
#endif
// include configure generated header to define
// CMAKE_NO_ANSI_STREAM_HEADERS and CMAKE_NO_STD_NAMESPACE
#if defined(CMAKE_HAS_AUTOCONF) || defined(CMAKE_BUILD_WITH_CMAKE)

View File

@ -27,7 +27,7 @@ class cmMakefile;
* cmSystemTools is a class that provides helper functions
* for the CMake build system.
*/
class CM_EXPORT cmSystemTools
class cmSystemTools
{
public:
/**

View File

@ -19,7 +19,7 @@
#include "cmMakefile.h"
#include "cmStandardIncludes.h"
class CM_EXPORT cmake
class cmake
{
public:

View File

@ -19,7 +19,7 @@
#include "cmMakefile.h"
#include "cmStandardIncludes.h"
class CM_EXPORT cmakewizard
class cmakewizard
{
public:
cmakewizard();