diff options
-rw-r--r-- | Source/cmTryCompileCommand.cxx | 5 |
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); |