diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-22 13:48:33 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-22 13:48:33 (GMT) |
commit | fd98b0cca0c18428cdeb9e2a015a8dc0a1fab6d2 (patch) | |
tree | 1974eea05aeb025612799157f281a93323ffbd72 | |
parent | 2489a3583df89d3b0c23e2170eef7fc5fe284f6b (diff) | |
download | CMake-fd98b0cca0c18428cdeb9e2a015a8dc0a1fab6d2.zip CMake-fd98b0cca0c18428cdeb9e2a015a8dc0a1fab6d2.tar.gz CMake-fd98b0cca0c18428cdeb9e2a015a8dc0a1fab6d2.tar.bz2 |
ENH: enable cxx by default if no languages have been enabled
-rw-r--r-- | Source/cmMSDotNETGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmMSProjectGenerator.cxx | 14 | ||||
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 9 |
3 files changed, 20 insertions, 4 deletions
diff --git a/Source/cmMSDotNETGenerator.cxx b/Source/cmMSDotNETGenerator.cxx index 5f6244e..a4937c9 100644 --- a/Source/cmMSDotNETGenerator.cxx +++ b/Source/cmMSDotNETGenerator.cxx @@ -34,6 +34,7 @@ cmMSDotNETGenerator::cmMSDotNETGenerator() void cmMSDotNETGenerator::GenerateMakefile() { + this->EnableLanguage("CXX"); std::string configTypes = m_Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"); std::string::size_type start = 0; std::string::size_type endpos = 0; diff --git a/Source/cmMSProjectGenerator.cxx b/Source/cmMSProjectGenerator.cxx index c6a48c4..c577efb 100644 --- a/Source/cmMSProjectGenerator.cxx +++ b/Source/cmMSProjectGenerator.cxx @@ -28,6 +28,7 @@ cmMSProjectGenerator::cmMSProjectGenerator() void cmMSProjectGenerator::GenerateMakefile() { + this->EnableLanguage("CXX"); if(m_BuildDSW) { delete m_DSWWriter; @@ -64,8 +65,13 @@ void cmMSProjectGenerator::EnableLanguage(const char*) "CMAKE_ROOT has not been defined, bad GUI or driver program"); return; } - std::string fpath = - m_Makefile->GetDefinition("CMAKE_ROOT"); - fpath += "/Templates/CMakeWindowsSystemConfig.cmake"; - m_Makefile->ReadListFile(NULL,fpath.c_str()); + if(!this->GetLanguageEnabled("CXX")) + { + std::string fpath = + m_Makefile->GetDefinition("CMAKE_ROOT"); + fpath += "/Templates/CMakeWindowsSystemConfig.cmake"; + m_Makefile->ReadListFile(NULL,fpath.c_str()); + this->SetLanguageEnabled("CXX"); + } } + diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index f6eeedf..e7d760e 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -41,6 +41,15 @@ cmUnixMakefileGenerator::~cmUnixMakefileGenerator() void cmUnixMakefileGenerator::GenerateMakefile() { + // for backwards compatibility if niether c or cxx is + // enabled, the enable cxx + if(! (this->GetLanguageEnabled("C") || + this->GetLanguageEnabled("CXX"))) + { + this->EnableLanguage("CXX"); + } + + // suppoirt override in output directories if (m_Makefile->GetDefinition("LIBRARY_OUTPUT_PATH")) { |