modified how paths are escaped, added depends
This commit is contained in:
parent
43ac1a3a86
commit
c84f6448a6
|
@ -53,16 +53,26 @@ LINK_LIBRARIES(CMakeLib)
|
||||||
LINK_DIRECTORIES(${CMake_BINARY_DIR}/Sources)
|
LINK_DIRECTORIES(${CMake_BINARY_DIR}/Sources)
|
||||||
|
|
||||||
ADD_EXECUTABLE(cmake cmakemain)
|
ADD_EXECUTABLE(cmake cmakemain)
|
||||||
ADD_EXECUTABLE(cmaketest cmaketest.cxx cmSystemTools.cxx)
|
|
||||||
|
|
||||||
CONFIGURE_FILE(
|
IF(BUILD_TESTING)
|
||||||
${CMake_SOURCE_DIR}/Source/cmaketest.h.in
|
IF (DART_ROOT)
|
||||||
${CMake_BINARY_DIR}/Source/cmaketest.h ESCAPE_QUOTES)
|
ADD_EXECUTABLE(cmaketest cmaketest.cxx cmSystemTools.cxx)
|
||||||
ADD_TEST(simple ${CMake_BINARY_DIR}/Source/cmaketest
|
ADD_DEPENDENCIES(cmaketest cmake)
|
||||||
${CMake_SOURCE_DIR}/Tests/Simple
|
ADD_DEPENDENCIES(Nightly cmaketest cmake)
|
||||||
${CMake_BINARY_DIR}/Tests/Simple
|
ADD_DEPENDENCIES(Experimental cmaketest cmake)
|
||||||
${CMake_BINARY_DIR}/Tests/Simple/simple
|
|
||||||
)
|
CONFIGURE_FILE(
|
||||||
|
${CMake_SOURCE_DIR}/Source/cmaketest.h.in
|
||||||
|
${CMake_BINARY_DIR}/Source/cmaketest.h ESCAPE_QUOTES)
|
||||||
|
ADD_TEST(simple ${CMake_BINARY_DIR}/Source/cmaketest
|
||||||
|
${CMake_SOURCE_DIR}/Tests/Simple
|
||||||
|
${CMake_BINARY_DIR}/Tests/Simple
|
||||||
|
${CMake_BINARY_DIR}/Tests/Simple/simple
|
||||||
|
)
|
||||||
|
|
||||||
|
ENDIF (DART_ROOT)
|
||||||
|
ENDIF(BUILD_TESTING)
|
||||||
|
|
||||||
|
|
||||||
INSTALL_TARGETS(/bin cmake)
|
INSTALL_TARGETS(/bin cmake)
|
||||||
|
|
||||||
|
|
|
@ -14,3 +14,4 @@ ADD_DEFINITIONS(-D_AFXDLL)
|
||||||
SET(CMAKE_MFC_FLAG 6)
|
SET(CMAKE_MFC_FLAG 6)
|
||||||
|
|
||||||
ADD_EXECUTABLE(CMakeSetup WIN32 SRCS)
|
ADD_EXECUTABLE(CMakeSetup WIN32 SRCS)
|
||||||
|
ADD_DEPENDENCIES(CMakeSetup cmake)
|
||||||
|
|
|
@ -51,18 +51,27 @@ bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string>& args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_Makefile->ExpandVariablesInString(args[0]);
|
m_Makefile->ExpandVariablesInString(args[0]);
|
||||||
m_Makefile->ExpandVariablesInString(args[1]);
|
|
||||||
|
|
||||||
// all target option
|
// all target option
|
||||||
|
std::string result;
|
||||||
|
std::vector<std::string>::iterator s = args.begin();
|
||||||
|
++s;
|
||||||
if (args.size() >= 3)
|
if (args.size() >= 3)
|
||||||
{
|
{
|
||||||
if (args[2] == "ALL")
|
if (args[1] == "ALL")
|
||||||
{
|
{
|
||||||
all = true;
|
all = true;
|
||||||
|
++s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (;s != args.end(); ++s)
|
||||||
|
{
|
||||||
|
m_Makefile->ExpandVariablesInString(*s);
|
||||||
|
result += cmSystemTools::EscapeSpaces(s->c_str());
|
||||||
|
result += " ";
|
||||||
|
}
|
||||||
m_Makefile->AddUtilityCommand(args[0].c_str(),
|
m_Makefile->AddUtilityCommand(args[0].c_str(),
|
||||||
args[1].c_str(), all);
|
result.c_str(), all);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ public:
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"ADD_CUSTOM_TARGET(Name \"command to run\" ALL)\n"
|
"ADD_CUSTOM_TARGET(Name [ALL] command arg arg arg ...)\n"
|
||||||
"The ALL option is optional. If it is specified it indicates that this target should be added to the Build all target.";
|
"The ALL option is optional. If it is specified it indicates that this target should be added to the Build all target.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ bool cmBuildCommand::InitialPass(std::vector<std::string>& args)
|
||||||
makecommand += "\"";
|
makecommand += "\"";
|
||||||
makecommand += " ";
|
makecommand += " ";
|
||||||
makecommand += m_Makefile->GetProjectName();
|
makecommand += m_Makefile->GetProjectName();
|
||||||
makecommand += ".dsw /MAKE \"ALL_BUILD - Release\" /REBUILD";
|
makecommand += ".dsw /MAKE \"ALL_BUILD - Release\" ";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue