diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMSProjectGenerator.cxx | 9 | ||||
-rw-r--r-- | Source/cmMSProjectGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmMakefileGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 30 | ||||
-rw-r--r-- | Source/cmUnixMakefileGenerator.h | 6 |
5 files changed, 49 insertions, 8 deletions
diff --git a/Source/cmMSProjectGenerator.cxx b/Source/cmMSProjectGenerator.cxx index 9a6f4f1..6a0c384 100644 --- a/Source/cmMSProjectGenerator.cxx +++ b/Source/cmMSProjectGenerator.cxx @@ -73,3 +73,12 @@ void cmMSProjectGenerator::SetLocal(bool local) { m_BuildDSW = !local; } + +void cmMSProjectGenerator::ComputeSystemInfo() +{ + // now load the settings + std::string fpath = + cmCacheManager::GetInstance()->GetCacheValue("CMAKE_ROOT"); + fpath += "/CMakeWindowsSystemConfig.cmake"; + m_Makefile->ReadListFile(NULL,fpath.c_str()); +} diff --git a/Source/cmMSProjectGenerator.h b/Source/cmMSProjectGenerator.h index a4f568b..07f7a50 100644 --- a/Source/cmMSProjectGenerator.h +++ b/Source/cmMSProjectGenerator.h @@ -98,6 +98,12 @@ public: cmDSPMakefile* GetDSPMakefile() {return m_DSPMakefile;} + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void ComputeSystemInfo(); + private: cmDSWMakefile* m_DSWMakefile; cmDSPMakefile* m_DSPMakefile; diff --git a/Source/cmMakefileGenerator.h b/Source/cmMakefileGenerator.h index 72832b2..a44e62b 100644 --- a/Source/cmMakefileGenerator.h +++ b/Source/cmMakefileGenerator.h @@ -76,6 +76,12 @@ public: */ virtual void SetLocal(bool ) {}; + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void ComputeSystemInfo() = 0; + protected: cmMakefile* m_Makefile; }; diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 352dfb8..3e47dca 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -755,7 +755,7 @@ void cmUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout) "THREAD_LIBS = @CMAKE_THREAD_LIBS@\n" "\n" "# set up the path to the rulesgen program\n" - "CMAKE_COMMAND = ${CMAKE_BINARY_DIR}/CMake/Source/CMakeBuildTargets\n" + "CMAKE_COMMAND = ${CMAKE_COMMAND}\n" "\n" "\n" "\n"; @@ -794,12 +794,6 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout) "Makefile cmake.depends ${TARGETS} ${SUBDIR_BUILD} ${CMAKE_COMMAND}", 0); this->OutputMakeRule(fout, - "rule to build cmake from source", - "${CMAKE_COMMAND}", "${CMAKE_SOURCE_DIR}/CMake/Source/*.cxx " - "${CMAKE_SOURCE_DIR}/CMake/Source/*.h", - "cd ${CMAKE_BINARY_DIR}/CMake/Source; " - "${MAKE} CMakeBuildTargets"); - this->OutputMakeRule(fout, "remove generated files", "clean", "${SUBDIR_CLEAN}", @@ -830,7 +824,7 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout) "rebuild_cache", "${CMAKE_BINARY_DIR}/CMakeCache.txt", "${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}/CMakeLists.txt " - "-MakeCache -S${CMAKE_SOURCE_DIR} -O${CMAKE_BINARY_DIR} " + "-S${CMAKE_SOURCE_DIR} -O${CMAKE_BINARY_DIR} " "-H${CMAKE_SOURCE_DIR} -B${CMAKE_BINARY_DIR}"); } @@ -889,3 +883,23 @@ void cmUnixMakefileGenerator::SetLocal (bool local) m_Recurse = true; } } + +void cmUnixMakefileGenerator::ComputeSystemInfo() +{ + if (m_CacheOnly) + { + // currently we run configure shell script here to determine the info + std::string output; + std::string cmd; + const char* root + = cmCacheManager::GetInstance()->GetCacheValue("CMAKE_ROOT"); + cmd = root; + cmd += "/Templates/configure"; + cmSystemTools::RunCommand(cmd.c_str(), output); + } + + // now load the settings + std::string fpath = m_Makefile->GetHomeOutputDirectory(); + fpath += "/CMakeSystemConfig.cmake"; + m_Makefile->ReadListFile(NULL,fpath.c_str()); +} diff --git a/Source/cmUnixMakefileGenerator.h b/Source/cmUnixMakefileGenerator.h index 8199017..4082724 100644 --- a/Source/cmUnixMakefileGenerator.h +++ b/Source/cmUnixMakefileGenerator.h @@ -84,6 +84,12 @@ public: */ void OutputObjectDepends(std::ostream&); + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void ComputeSystemInfo(); + private: void RecursiveGenerateCacheOnly(); void GenerateCacheOnly(); |