summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-08-04 20:33:10 (GMT)
committerBrad King <brad.king@kitware.com>2004-08-04 20:33:10 (GMT)
commit9b1771aef4c38d2b536d1b2306b62c1b2c27266e (patch)
tree4db25f1fb06ee22705bef16f70b1a9bbd852847a
parentf99d94891680c9b14a91579bc4e96b89c9246656 (diff)
downloadCMake-9b1771aef4c38d2b536d1b2306b62c1b2c27266e.zip
CMake-9b1771aef4c38d2b536d1b2306b62c1b2c27266e.tar.gz
CMake-9b1771aef4c38d2b536d1b2306b62c1b2c27266e.tar.bz2
BUG: CMAKE_TRY_COMPILE_CONFIGURATION should be obtained from the cmMakefile instance for the listfile containing the TRY_COMPILE call, not the top level listfile.
-rw-r--r--Source/cmGlobalCodeWarriorGenerator.cxx3
-rw-r--r--Source/cmGlobalCodeWarriorGenerator.h2
-rw-r--r--Source/cmGlobalGenerator.cxx2
-rw-r--r--Source/cmGlobalGenerator.h2
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx8
-rw-r--r--Source/cmGlobalVisualStudio6Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx8
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h2
-rw-r--r--Source/cmMakefile.cxx3
9 files changed, 17 insertions, 15 deletions
diff --git a/Source/cmGlobalCodeWarriorGenerator.cxx b/Source/cmGlobalCodeWarriorGenerator.cxx
index d30b238..0a9c1b5 100644
--- a/Source/cmGlobalCodeWarriorGenerator.cxx
+++ b/Source/cmGlobalCodeWarriorGenerator.cxx
@@ -44,7 +44,8 @@ int cmGlobalCodeWarriorGenerator::TryCompile(const char *,
const char* /*bindir*/,
const char* /*projectName*/,
const char* /*targetName*/,
- std::string* /*output*/)
+ std::string* /*output*/,
+ cmMakefile* /*mf*/)
{
return 1;
}
diff --git a/Source/cmGlobalCodeWarriorGenerator.h b/Source/cmGlobalCodeWarriorGenerator.h
index d4859ad..3c6dee2 100644
--- a/Source/cmGlobalCodeWarriorGenerator.h
+++ b/Source/cmGlobalCodeWarriorGenerator.h
@@ -54,7 +54,7 @@ public:
*/
virtual int TryCompile(const char *srcdir, const char *bindir,
const char *projectName, const char *targetName,
- std::string *output);
+ std::string *output, cmMakefile* mf);
/**
* Generate the all required files for building this project/tree. This
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 907e111..2ab00a6 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -448,7 +448,7 @@ void cmGlobalGenerator::LocalGenerate()
int cmGlobalGenerator::TryCompile(const char *, const char *bindir,
const char *, const char *target,
- std::string *output)
+ std::string *output, cmMakefile*)
{
// now build the test
std::string makeCommand =
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index a22bc4c..b963316 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -90,7 +90,7 @@ public:
*/
virtual int TryCompile(const char *srcdir, const char *bindir,
const char *projectName, const char *targetName,
- std::string *output);
+ std::string *output, cmMakefile* mf);
///! Set the CMake instance
void SetCMakeInstance(cmake *cm) {
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index f4ae839..5dfda72 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -68,7 +68,8 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
const char *bindir,
const char *projectName,
const char *targetName,
- std::string *output)
+ std::string *output,
+ cmMakefile* mf)
{
// now build the test
std::string makeCommand =
@@ -115,10 +116,9 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
makeCommand += "ALL_BUILD";
}
makeCommand += " - ";
- if ( m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION") )
+ if(const char* config = mf->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION"))
{
- makeCommand +=
- m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
+ makeCommand += config;
}
else
{
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index 4aaa619..97338a1 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -55,7 +55,7 @@ public:
*/
virtual int TryCompile(const char *srcdir, const char *bindir,
const char *projectName, const char *targetName,
- std::string *output);
+ std::string *output, cmMakefile* mf);
/**
* Generate the all required files for building this project/tree. This
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index d7301a0..b8fa1af 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -44,7 +44,8 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *,
const char *bindir,
const char *projectName,
const char *targetName,
- std::string *output)
+ std::string *output,
+ cmMakefile* mf)
{
// now build the test
std::string makeCommand =
@@ -77,10 +78,9 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *,
makeCommand += " ";
makeCommand += projectName;
makeCommand += ".sln /build ";
- if ( m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION") )
+ if(const char* config = mf->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION"))
{
- makeCommand +=
- m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
+ makeCommand += config;
}
else
{
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 50e6984..2c4db0e 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -55,7 +55,7 @@ public:
*/
virtual int TryCompile(const char *srcdir, const char *bindir,
const char *projectName, const char *targetName,
- std::string *output);
+ std::string *output, cmMakefile* mf);
/**
* Generate the all required files for building this project/tree. This
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c552671..1f6b8f2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2093,7 +2093,8 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
m_LocalGenerator->GetGlobalGenerator()->TryCompile(srcdir,bindir,
projectName,
targetName,
- output);
+ output,
+ this);
cmSystemTools::ChangeDirectory(cwd.c_str());
return ret;