summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-12-11 15:34:35 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-12-11 15:34:35 (GMT)
commit1c6203b4060ab8b14534085c3e4ccf635d2ff43d (patch)
tree09bd500607cbb21a8f9b79d54a3c7da7a02d723f /Source/cmGlobalGenerator.cxx
parentee548d8fd89277884cd2f24f92fee4092491f136 (diff)
downloadCMake-1c6203b4060ab8b14534085c3e4ccf635d2ff43d.zip
CMake-1c6203b4060ab8b14534085c3e4ccf635d2ff43d.tar.gz
CMake-1c6203b4060ab8b14534085c3e4ccf635d2ff43d.tar.bz2
Add java support
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx34
1 files changed, 28 insertions, 6 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3edb0d1..e0edfed 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -81,6 +81,16 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
}
bool needCBackwards = false;
bool needCXXBackwards = false;
+
+ if (!isLocal &&
+ !this->GetLanguageEnabled("C") && !this->GetLanguageEnabled("CXX") &&
+ !this->GetLanguageEnabled("JAVA"))
+ {
+ // Read the DetermineSystem file
+ std::string systemFile = root;
+ systemFile += "/Modules/CMakeDetermineSystem.cmake";
+ mf->ReadListFile(0, systemFile.c_str());
+ }
// check for a C compiler and configure it
if(!isLocal &&
@@ -95,10 +105,6 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
"CMake");
}
needCBackwards = true;
- // Read the DetermineSystem file
- std::string systemFile = root;
- systemFile += "/Modules/CMakeDetermineSystem.cmake";
- mf->ReadListFile(0, systemFile.c_str());
// read determine C compiler
std::string determineCFile = root;
determineCFile += "/Modules/CMakeDetermineCCompiler.cmake";
@@ -142,7 +148,17 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
}
}
-
+ // check for a Java compiler and configure it
+ if(!isLocal &&
+ !this->GetLanguageEnabled("JAVA") &&
+ strcmp(lang, "JAVA") == 0)
+ {
+ std::string determineCFile = root;
+ determineCFile += "/Modules/CMakeDetermineJavaCompiler.cmake";
+ mf->ReadListFile(0,determineCFile.c_str());
+ this->SetLanguageEnabled("JAVA");
+ }
+
std::string fpath = rootBin;
if(!mf->GetDefinition("CMAKE_SYSTEM_LOADED"))
{
@@ -162,7 +178,13 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
fpath += "/CMakeCXXCompiler.cmake";
mf->ReadListFile(0,fpath.c_str());
}
- if(!mf->GetDefinition("CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED"))
+ if(strcmp(lang, "JAVA") == 0 && !mf->GetDefinition("CMAKE_JAVA_COMPILER_LOADED"))
+ {
+ fpath = rootBin;
+ fpath += "/CMakeJavaCompiler.cmake";
+ mf->ReadListFile(0,fpath.c_str());
+ }
+ if ( lang[0] == 'C' && !mf->GetDefinition("CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED"))
{
fpath = root;
fpath += "/Modules/CMakeSystemSpecificInformation.cmake";