summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-25 14:07:45 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-25 14:07:45 (GMT)
commit561a3da2043c3fbebd1f90c88842513625076aed (patch)
tree1b0853e8216562ffef1306a9245412e02c1c7595 /Source/cmGlobalUnixMakefileGenerator.cxx
parent6ff1579ba7501da1f9ab677f9a506c75e6ff8a55 (diff)
downloadCMake-561a3da2043c3fbebd1f90c88842513625076aed.zip
CMake-561a3da2043c3fbebd1f90c88842513625076aed.tar.gz
CMake-561a3da2043c3fbebd1f90c88842513625076aed.tar.bz2
Several changes: COMPILE_DEFINITIONS is now depricated. If you want to specify some, use CMAKE_FLAGS -DCMAKE_DEFINITIONS:STRING=...; same goes for libraries, include path, ... It now detects wether the file is C or C++ and uses the apropriate project command, it also does the right thing when doing try_compile, so it does not execute configure for every single try_compile
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator.cxx33
1 files changed, 22 insertions, 11 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator.cxx b/Source/cmGlobalUnixMakefileGenerator.cxx
index 9314d5f..1cc7b35 100644
--- a/Source/cmGlobalUnixMakefileGenerator.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator.cxx
@@ -54,14 +54,20 @@ void cmGlobalUnixMakefileGenerator::EnableLanguage(const char* lang,
putenv(envCC);
#endif
}
- if (!m_CMakeInstance->GetIsInTryCompile())
+ if (m_CMakeInstance->GetIsInTryCompile())
{
- std::string cmd = root;
- cmd += "/Templates/cconfigure";
- cmSystemTools::RunCommand(cmd.c_str(), output,
- cmSystemTools::ConvertToOutputPath(
- mf->GetHomeOutputDirectory()).c_str());
+ cmSystemTools::Error("This should not have happen. "
+ "If you see this message, you are probably using a "
+ "broken CMakeLists.txt file or a problematic release of "
+ "CMake");
}
+
+ std::string cmd = root;
+ cmd += "/Templates/cconfigure";
+ cmSystemTools::RunCommand(cmd.c_str(), output,
+ cmSystemTools::ConvertToOutputPath(
+ mf->GetHomeOutputDirectory()).c_str());
+
std::string fpath = mf->GetHomeOutputDirectory();
fpath += "/CCMakeSystemConfig.cmake";
mf->ReadListFile(0,fpath.c_str());
@@ -100,13 +106,18 @@ void cmGlobalUnixMakefileGenerator::EnableLanguage(const char* lang,
#endif
}
std::string cmd = root;
- if (!m_CMakeInstance->GetIsInTryCompile())
+ if (m_CMakeInstance->GetIsInTryCompile())
{
- cmd += "/Templates/cxxconfigure";
- cmSystemTools::RunCommand(cmd.c_str(), output,
- cmSystemTools::ConvertToOutputPath(
- mf->GetHomeOutputDirectory()).c_str());
+ cmSystemTools::Error("This should not have happen. "
+ "If you see this message, you are probably using a "
+ "broken CMakeLists.txt file or a problematic release of "
+ "CMake");
}
+ cmd += "/Templates/cxxconfigure";
+ cmSystemTools::RunCommand(cmd.c_str(), output,
+ cmSystemTools::ConvertToOutputPath(
+ mf->GetHomeOutputDirectory()).c_str());
+
std::string fpath = mf->GetHomeOutputDirectory();
fpath += "/CXXCMakeSystemConfig.cmake";
mf->ReadListFile(0,fpath.c_str());