浏览代码

removed shared lib support

Ken Martin 23 年之前
父节点
当前提交
499bd45d4d

+ 0 - 4
Source/CMakeLists.txt

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

+ 44 - 60
Source/cmCPluginAPI.h

@@ -34,22 +34,6 @@
 #define CM_PLUGIN_EXPORT 
 #define CM_PLUGIN_EXPORT 
 #endif
 #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
 /* define the different types of cache entries, see cmCacheManager.h for more
    information */
    information */
@@ -99,15 +83,15 @@ extern "C" {
   /* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how
   /* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how
      information is passed from the InitialPass to FInalPass for commands
      information is passed from the InitialPass to FInalPass for commands
      that need a FinalPass and need information from the InitialPass */
      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 */
   /* 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 */
   /* 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
   /* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how
      information is passed from the InitialPass to FInalPass for commands
      information is passed from the InitialPass to FInalPass for commands
      that need a FinalPass and need information from the InitialPass */
      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
   /* 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
      of these methods take the void * makefile pointer as their first
      argument. */
      argument. */
   /*=========================================================================*/
   /*=========================================================================*/
-  extern CM_EXPORT void cmAddCacheDefinition(void *mf, const char* name, 
+  extern void cmAddCacheDefinition(void *mf, const char* name, 
                                              const char* value, 
                                              const char* value, 
                                              const char* doc,
                                              const char* doc,
                                              int cachetype);
                                              int cachetype);
-  extern CM_EXPORT void cmAddCustomCommand(void *mf, const char* source,
+  extern void cmAddCustomCommand(void *mf, const char* source,
                                            const char* command,
                                            const char* command,
                                            int numArgs,
                                            int numArgs,
                                            const char **args,
                                            const char **args,
@@ -128,53 +112,53 @@ extern "C" {
                                            int numOutputs,
                                            int numOutputs,
                                            const char **outputs,
                                            const char **outputs,
                                            const char *target);
                                            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);
                                         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 numSrcs, const char **srcs, 
                                         int win32);
                                         int win32);
-  extern CM_EXPORT void cmAddLibrary(void *mf, const char *libname, 
+  extern void cmAddLibrary(void *mf, const char *libname, 
                                      int shared, int numSrcs, 
                                      int shared, int numSrcs, 
                                      const char **srcs);
                                      const char **srcs);
-  extern CM_EXPORT void cmAddLinkDirectoryForTarget(void *mf,
+  extern void cmAddLinkDirectoryForTarget(void *mf,
                                                     const char *tgt, 
                                                     const char *tgt, 
                                                     const char* d);
                                                     const char* d);
-  extern CM_EXPORT void cmAddLinkLibraryForTarget(void *mf,
+  extern void cmAddLinkLibraryForTarget(void *mf,
                                                   const char *tgt, 
                                                   const char *tgt, 
                                                   const char *libname, 
                                                   const char *libname, 
                                                   int libtype);
                                                   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 *command,
                                             const char *arguments,
                                             const char *arguments,
                                             int all, int numDepends,
                                             int all, int numDepends,
                                             const char **depends,
                                             const char **depends,
                                             int numOutputs,
                                             int numOutputs,
                                             const char **outputs);
                                             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);
                                          int numArgs, const char **args);
-  extern CM_EXPORT 
+  extern 
   void cmExpandSourceListArguments(void *mf,int argc, const char **argv,
   void cmExpandSourceListArguments(void *mf,int argc, const char **argv,
                                    int *resArgc, char ***resArgv,
                                    int *resArgc, char ***resArgv,
                                    unsigned int startArgumentIndex);
                                    unsigned int startArgumentIndex);
-  extern CM_EXPORT char *cmExpandVariablesInString(void *mf,
+  extern char *cmExpandVariablesInString(void *mf,
                                                    const char *source, 
                                                    const char *source, 
                                                    int escapeQuotes,
                                                    int escapeQuotes,
                                                    int atOnly);
                                                    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
   cmSourceFiles. Please see cmSourceFile.h for additional information on many
   of these methods. Some of these methods are in cmMakefile.h. */
   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);
                                                        const char *prop);
-  extern CM_EXPORT int cmSourceFileGetPropertyAsBool(void *sf, 
+  extern int cmSourceFileGetPropertyAsBool(void *sf, 
                                                      const char *prop);
                                                      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,
   void cmSourceFileSetName(void *sf, const char* name, const char* dir,
                            int numSourceExtensions,
                            int numSourceExtensions,
                            const char **sourceExtensions,
                            const char **sourceExtensions,
                            int numHeaderExtensions,
                            int numHeaderExtensions,
                            const char **headerExtensions);
                            const char **headerExtensions);
-  extern CM_EXPORT 
+  extern 
   void cmSourceFileSetName2(void *sf, const char* name, const char* dir, 
   void cmSourceFileSetName2(void *sf, const char* name, const char* dir, 
                             const char *ext, int headerFileOnly);
                             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);
                                                 const char *value);
   
   
   
   
@@ -208,10 +192,10 @@ extern "C" {
   /* the following methods are from cmSystemTools.h see that file for
   /* the following methods are from cmSystemTools.h see that file for
      specific documentaiton on each method. */
      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
 #ifdef  __cplusplus
 }
 }

+ 15 - 15
Source/cmCacheManager.h

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

+ 3 - 3
Source/cmDirectory.h

@@ -37,17 +37,17 @@ public:
    * in that directory. 0 is returned if the directory can not be 
    * in that directory. 0 is returned if the directory can not be 
    * opened, 1 if it is opened.   
    * 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.
    * 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
    * 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:
 private:
   std::vector<std::string> m_Files; // Array of Files
   std::vector<std::string> m_Files; // Array of Files

+ 2 - 2
Source/cmListFileCache.h

@@ -45,8 +45,8 @@ struct cmListFile
 class cmListFileCache
 class cmListFileCache
 {
 {
 public:
 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.
   /** Return the cached version of the given file.

+ 4 - 4
Source/cmMakefile.h

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

+ 2 - 2
Source/cmMakefileGenerator.h

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

+ 1 - 1
Source/cmRegularExpression.h

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

+ 0 - 11
Source/cmStandardIncludes.h

@@ -21,17 +21,6 @@
 #ifndef cmStandardIncludes_h
 #ifndef cmStandardIncludes_h
 #define 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
 // include configure generated  header to define
 // CMAKE_NO_ANSI_STREAM_HEADERS and CMAKE_NO_STD_NAMESPACE
 // CMAKE_NO_ANSI_STREAM_HEADERS and CMAKE_NO_STD_NAMESPACE
 #if defined(CMAKE_HAS_AUTOCONF) || defined(CMAKE_BUILD_WITH_CMAKE)
 #if defined(CMAKE_HAS_AUTOCONF) || defined(CMAKE_BUILD_WITH_CMAKE)

+ 1 - 1
Source/cmSystemTools.h

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

+ 1 - 1
Source/cmake.h

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

+ 1 - 1
Source/cmakewizard.h

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