diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2000-08-29 19:26:29 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2000-08-29 19:26:29 (GMT) |
commit | 1f42f521cea8b953f4ad7ef5ca0d4c6d49c42a88 (patch) | |
tree | a7b88a2e4397167c0d6c72c9cf0fcf8f91dcd024 /Source/cmMakefile.h | |
parent | d6bdba1096f36268e414f32829e22159e983031a (diff) | |
download | CMake-1f42f521cea8b953f4ad7ef5ca0d4c6d49c42a88.zip CMake-1f42f521cea8b953f4ad7ef5ca0d4c6d49c42a88.tar.gz CMake-1f42f521cea8b953f4ad7ef5ca0d4c6d49c42a88.tar.bz2 |
NEW: move from tools and config to create CMake
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h new file mode 100644 index 0000000..35781b4 --- /dev/null +++ b/Source/cmMakefile.h @@ -0,0 +1,104 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile$ + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) 2000 National Library of Medicine + All rights reserved. + + See COPYRIGHT.txt for copyright details. + +=========================================================================*/ +/** + * cmMakefile + */ +#ifndef cmMakefile_h +#define cmMakefile_h +#ifdef _MSC_VER +#pragma warning ( disable : 4786 ) +#endif + +#include "cmClassFile.h" +#include <vector> +#include <fstream> +#include <iostream> + +class cmMakefile +{ +public: + cmMakefile(); + // Parse a Makfile.in file + bool ReadMakefile(const char* makefile); + // Print useful stuff to stdout + void Print(); + // Set the home directory for the project + void SetHomeDirectory(const char* dir) + { + m_cmHomeDirectory = dir; + } + const char* GetHomeDirectory() + { + return m_cmHomeDirectory.c_str(); + } + // Set the current directory in the project + void SetCurrentDirectory(const char* dir) + { + m_cmCurrentDirectory = dir; + } + const char* GetCurrentDirectory() + { + return m_cmCurrentDirectory.c_str(); + } + // Set the name of the library that is built by this makefile + void SetLibraryName(const char* lib) + { + m_LibraryName = lib; + } + const char* GetLibraryName() + { + return m_LibraryName.c_str(); + } + + // Set the name of the library that is built by this makefile + void SetOutputDirectory(const char* lib) + { + m_OutputDirectory = lib; + } + const char* GetOutputDirectory() + { + return m_OutputDirectory.c_str(); + } + + // Set the name of the library that is built by this makefile + void SetOutputHomeDirectory(const char* lib) + { + m_OutputHomeDirectory = lib; + } + const char* GetOutputHomeDirectory() + { + return m_OutputHomeDirectory.c_str(); + } + +private: + void ReadSubdirs(std::ifstream& fin); + void ReadClasses(std::ifstream& fin, bool t); + friend class cmMakeDepend; // make depend needs direct access + // to the m_Classes array +protected: + bool m_Executables; + std::string m_Prefix; + std::string m_OutputDirectory; // Current output directory for makefile + std::string m_OutputHomeDirectory; // Top level output directory + std::string m_cmHomeDirectory; // Home directory for source + std::string m_cmCurrentDirectory; // current directory in source + std::string m_LibraryName; // library name + std::vector<cmClassFile> m_Classes; // list of classes in makefile + std::vector<std::string> m_SubDirectories; // list of sub directories +}; + + +#endif |