summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-06-01 19:51:24 (GMT)
committerBrad King <brad.king@kitware.com>2006-06-01 19:51:24 (GMT)
commit87d4d0e0394f30bb320b3939b1852a7cae2177cb (patch)
treeb513f5cdebbefb99b4215ef5934b9ecd06720f57 /Source
parentbfb0ec58e819ae4d168337c5aadf73764599adc8 (diff)
downloadCMake-87d4d0e0394f30bb320b3939b1852a7cae2177cb.zip
CMake-87d4d0e0394f30bb320b3939b1852a7cae2177cb.tar.gz
CMake-87d4d0e0394f30bb320b3939b1852a7cae2177cb.tar.bz2
BUG: cmGlobalGenerator::Build should not always use the /fast target name because dependency checking is often required. It now takes an argument specifying whether to use the /fast target name, and the argument is currently only true for try-compiles.
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenericGenerator.cxx2
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx2
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx2
-rw-r--r--Source/cmBuildCommand.cxx2
-rw-r--r--Source/cmGlobalGenerator.cxx10
-rw-r--r--Source/cmGlobalGenerator.h4
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx7
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h2
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx3
-rw-r--r--Source/cmGlobalVisualStudio6Generator.h3
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h3
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx3
-rw-r--r--Source/cmGlobalXCodeGenerator.h3
14 files changed, 28 insertions, 20 deletions
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx
index c0b9785..0d122cb 100644
--- a/Source/CPack/cmCPackGenericGenerator.cxx
+++ b/Source/CPack/cmCPackGenericGenerator.cxx
@@ -346,7 +346,7 @@ int cmCPackGenericGenerator::InstallProject()
= globalGenerator->GenerateBuildCommand(cmakeMakeProgram,
installProjectName.c_str(), 0,
globalGenerator->GetPreinstallTargetName(),
- buildConfig, false);
+ buildConfig, false, false);
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Install command: " << buildCommand << std::endl);
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index b7a27d9..6948bc6 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -196,7 +196,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
this->SourceDir.c_str(), this->BinaryDir.c_str(),
this->BuildProject.c_str(), tarIt->c_str(),
&output, this->BuildMakeProgram.c_str(),
- this->CTest->GetConfigType().c_str(),!this->BuildNoClean);
+ this->CTest->GetConfigType().c_str(),!this->BuildNoClean, false);
out << output;
// if the build failed then return
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 7838118..f6a196d 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -93,7 +93,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
std::string buildCommand
= this->GlobalGenerator->GenerateBuildCommand(cmakeMakeProgram,
cmakeProjectName,
- cmakeBuildAdditionalFlags, 0, cmakeBuildConfiguration, true);
+ cmakeBuildAdditionalFlags, 0, cmakeBuildConfiguration, true, false);
this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str());
}
else
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx
index 13443b0..405b463 100644
--- a/Source/cmBuildCommand.cxx
+++ b/Source/cmBuildCommand.cxx
@@ -34,7 +34,7 @@ bool cmBuildCommand::InitialPass(std::vector<std::string> const& args)
std::string makecommand = this->Makefile->GetLocalGenerator()
->GetGlobalGenerator()->GenerateBuildCommand
(makeprogram.c_str(), this->Makefile->GetProjectName(), 0,
- 0, "Release", true);
+ 0, "Release", true, false);
if(cacheValue)
{
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index cc02b14..c04ad73 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -770,13 +770,13 @@ int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir,
const char* config = mf->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
return this->Build(srcdir,bindir,projectName,
newTarget.c_str(),
- output,makeCommand.c_str(),config,false);
+ output,makeCommand.c_str(),config,false,true);
}
std::string cmGlobalGenerator
::GenerateBuildCommand(const char* makeProgram, const char *projectName,
const char* additionalOptions, const char *targetName,
- const char* config, bool ignoreErrors)
+ const char* config, bool ignoreErrors, bool)
{
// Project name and config are not used yet.
(void)projectName;
@@ -814,7 +814,7 @@ int cmGlobalGenerator::Build(
std::string *output,
const char *makeCommandCSTR,
const char *config,
- bool clean)
+ bool clean, bool fast)
{
*output += "\nTesting TryCompileWithoutMakefile\n";
@@ -834,7 +834,7 @@ int cmGlobalGenerator::Build(
{
std::string cleanCommand =
this->GenerateBuildCommand(makeCommandCSTR, projectName,
- 0, "clean", config, false);
+ 0, "clean", config, false, fast);
if (!cmSystemTools::RunSingleCommand(cleanCommand.c_str(), output,
&retVal, 0, false, timeout))
{
@@ -854,7 +854,7 @@ int cmGlobalGenerator::Build(
// now build
std::string makeCommand =
this->GenerateBuildCommand(makeCommandCSTR, projectName,
- 0, target, config, false);
+ 0, target, config, false, fast);
if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), output,
&retVal, 0, false, timeout))
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index b8c1d33..b60d497 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -100,12 +100,12 @@ public:
const char *projectName, const char *targetName,
std::string *output,
const char *makeProgram, const char *config,
- bool clean);
+ bool clean, bool fast);
virtual std::string GenerateBuildCommand
(const char* makeProgram,
const char *projectName, const char* additionalOptions,
const char *targetName,
- const char* config, bool ignoreErrors);
+ const char* config, bool ignoreErrors, bool fast);
///! Set the CMake instance
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index ac9e5b9..b86da5a 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -597,7 +597,7 @@ cmGlobalUnixMakefileGenerator3
std::string cmGlobalUnixMakefileGenerator3
::GenerateBuildCommand(const char* makeProgram, const char *projectName,
const char* additionalOptions, const char *targetName,
- const char* config, bool ignoreErrors)
+ const char* config, bool ignoreErrors, bool fast)
{
// Project name and config are not used yet.
(void)projectName;
@@ -644,7 +644,10 @@ std::string cmGlobalUnixMakefileGenerator3
lg->SetupPathConversions();
makeCommand += " \"";
std::string tname = targetName;
- tname += "/fast";
+ if(fast)
+ {
+ tname += "/fast";
+ }
tname = lg->Convert(tname.c_str(),cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKEFILE);
tname = lg->ConvertToMakeTarget(tname.c_str());
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index d8fe3f7..ad1e3b9 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -121,7 +121,7 @@ public:
(const char* makeProgram,
const char *projectName, const char* additionalOptions,
const char *targetName,
- const char* config, bool ignoreErrors);
+ const char* config, bool ignoreErrors, bool fast);
// returns true if a progress rule should be added
int ShouldAddProgressRule();
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 46575e3..88579e7 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -73,7 +73,8 @@ std::string cmGlobalVisualStudio6Generator
const char* additionalOptions,
const char *targetName,
const char* config,
- bool ignoreErrors)
+ bool ignoreErrors,
+ bool)
{
// Ingoring errors is not implemented in visual studio 6
(void) ignoreErrors;
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index 07456a2..792e7b1 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -60,7 +60,8 @@ public:
const char* additionalOptions,
const char *targetName,
const char* config,
- bool ignoreErrors);
+ bool ignoreErrors,
+ bool fast);
/**
* Generate the all required files for building this project/tree. This
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 5a487f7..923e468 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -71,7 +71,7 @@ std::string cmGlobalVisualStudio7Generator
::GenerateBuildCommand(const char* makeProgram,
const char *projectName,
const char* additionalOptions, const char *targetName,
- const char* config, bool ignoreErrors)
+ const char* config, bool ignoreErrors, bool)
{
// Ingoring errors is not implemented in visual studio 6
(void) ignoreErrors;
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 5b14449..9ff97da 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -60,7 +60,8 @@ public:
const char* additionalOptions,
const char *targetName,
const char* config,
- bool ignoreErrors);
+ bool ignoreErrors,
+ bool fast);
/**
* Generate the all required files for building this project/tree. This
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index d9e2451..f398a7f 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -133,7 +133,8 @@ std::string cmGlobalXCodeGenerator
const char* additionalOptions,
const char *targetName,
const char* config,
- bool ignoreErrors)
+ bool ignoreErrors,
+ bool)
{
// Config is not used yet
(void) ignoreErrors;
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 326bfd0..991a223 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -63,7 +63,8 @@ public:
const char* additionalOptions,
const char *targetName,
const char* config,
- bool ignoreErrors);
+ bool ignoreErrors,
+ bool fast);
/**
* Generate the all required files for building this project/tree. This