summaryrefslogtreecommitdiffstats
path: root/Source/cmTryCompileCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-03-02 19:39:12 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-03-02 19:39:12 (GMT)
commit20009401368e07bb81ad6ffe3796fb66367a985b (patch)
tree799fe316f8a1ff0b0dabdf60dfdb5914a006db27 /Source/cmTryCompileCommand.cxx
parent6fadc10e01941a86e08a1dc02f9f16b8c231eb78 (diff)
downloadCMake-20009401368e07bb81ad6ffe3796fb66367a985b.zip
CMake-20009401368e07bb81ad6ffe3796fb66367a985b.tar.gz
CMake-20009401368e07bb81ad6ffe3796fb66367a985b.tar.bz2
ENH: pass CMAKE_MODULE_PATH into try compile projects
Diffstat (limited to 'Source/cmTryCompileCommand.cxx')
-rw-r--r--Source/cmTryCompileCommand.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx
index faafde9..803b639 100644
--- a/Source/cmTryCompileCommand.cxx
+++ b/Source/cmTryCompileCommand.cxx
@@ -150,6 +150,11 @@ int cmTryCompileCommand::CoreTryCompileCode(
std::string ext = cmSystemTools::GetFilenameExtension(source);
const char* lang = (mf->GetCMakeInstance()->GetGlobalGenerator()
->GetLanguageFromExtension(ext.c_str()));
+ const char* def = mf->GetDefinition("CMAKE_MODULE_PATH");
+ if(def)
+ {
+ fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def);
+ }
if(lang)
{
fprintf(fout, "PROJECT(CMAKE_TRY_COMPILE %s)\n", lang);