ENH: enable cxx by default if no languages have been enabled
This commit is contained in:
parent
2489a3583d
commit
fd98b0cca0
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue