summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-18 15:37:40 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-09-18 15:37:40 (GMT)
commit610ff11cf3725178d70ff0719aedf2f4520e38ce (patch)
tree19879cad94ba7715d84ddaa8f7859716071b1f3d /Source/cmMakefile.cxx
parentf835a83b8d05067522d65756161d7cf5034bb3c4 (diff)
downloadCMake-610ff11cf3725178d70ff0719aedf2f4520e38ce.zip
CMake-610ff11cf3725178d70ff0719aedf2f4520e38ce.tar.gz
CMake-610ff11cf3725178d70ff0719aedf2f4520e38ce.tar.bz2
now Try compile can include CMAKE_FLAGS
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ec8871b..106d373 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1339,7 +1339,8 @@ void cmMakefile::ExpandSourceListArguments(
}
int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
- const char *projectName, const char *targetName)
+ const char *projectName, const char *targetName,
+ const std::vector<std::string> *cmakeArgs)
{
// does the binary directory exist ? If not create it...
if (!cmSystemTools::FileIsDirectory(bindir))
@@ -1377,7 +1378,11 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
cm.SetStartOutputDirectory(bindir);
cm.SetCMakeCommand(cmakeCommand.c_str());
cm.LoadCache();
-
+ // if cmake args were provided then pass them in
+ if (cmakeArgs)
+ {
+ cm.SetCacheArgs(*cmakeArgs);
+ }
// to save time we pass the EnableLanguage info directly
gg->EnableLanguagesFromGenerator(m_LocalGenerator->GetGlobalGenerator(),
this);