From 20009401368e07bb81ad6ffe3796fb66367a985b Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 2 Mar 2006 14:39:12 -0500 Subject: ENH: pass CMAKE_MODULE_PATH into try compile projects --- Source/cmTryCompileCommand.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v0.12