BUG: Do not place $(CMAKE_COMMAND) in link scripts.

This commit is contained in:
Brad King 2008-03-01 09:08:34 -05:00
parent c0f2d419e0
commit 230c8972f7
2 changed files with 10 additions and 4 deletions

View File

@ -172,14 +172,14 @@ ENDIF(CMAKE_FORCE_WIN64)
# default to Debug builds
IF(MSVC_VERSION GREATER 1310)
# for 2005 make sure the manifest is put in the dll with mt
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "$(CMAKE_COMMAND) -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
SET(CMAKE_CXX_CREATE_SHARED_MODULE "$(CMAKE_COMMAND) -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_MODULE}")
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
SET(CMAKE_CXX_CREATE_SHARED_MODULE "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_MODULE}")
# create a C shared library
SET(CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
# create a C shared module just copy the shared library rule
SET(CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}")
SET(CMAKE_CXX_LINK_EXECUTABLE "$(CMAKE_COMMAND) -E vs_link_exe ${CMAKE_CXX_LINK_EXECUTABLE}")
SET(CMAKE_C_LINK_EXECUTABLE "$(CMAKE_COMMAND) -E vs_link_exe ${CMAKE_C_LINK_EXECUTABLE}")
SET(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_CXX_LINK_EXECUTABLE}")
SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_C_LINK_EXECUTABLE}")
SET(CMAKE_BUILD_TYPE_INIT Debug)
SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR")

View File

@ -938,6 +938,12 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
return replaceValues.LinkLibraries;
}
}
if(variable == "CMAKE_COMMAND")
{
const char* cmcommand =
this->GlobalGenerator->GetCMakeInstance()->GetCMakeCommand();
return this->Convert(cmcommand, FULL, SHELL);
}
std::vector<std::string> enabledLanguages;
this->GlobalGenerator->GetEnabledLanguages(enabledLanguages);
// loop over language specific replace variables