modified how paths are escaped, added depends

This commit is contained in:
Ken Martin 2001-06-26 13:23:55 -04:00
parent 43ac1a3a86
commit c84f6448a6
5 changed files with 35 additions and 15 deletions

View File

@ -53,16 +53,26 @@ LINK_LIBRARIES(CMakeLib)
LINK_DIRECTORIES(${CMake_BINARY_DIR}/Sources)
ADD_EXECUTABLE(cmake cmakemain)
ADD_EXECUTABLE(cmaketest cmaketest.cxx cmSystemTools.cxx)
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
)
IF(BUILD_TESTING)
IF (DART_ROOT)
ADD_EXECUTABLE(cmaketest cmaketest.cxx cmSystemTools.cxx)
ADD_DEPENDENCIES(cmaketest cmake)
ADD_DEPENDENCIES(Nightly cmaketest cmake)
ADD_DEPENDENCIES(Experimental cmaketest cmake)
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)

View File

@ -14,3 +14,4 @@ ADD_DEFINITIONS(-D_AFXDLL)
SET(CMAKE_MFC_FLAG 6)
ADD_EXECUTABLE(CMakeSetup WIN32 SRCS)
ADD_DEPENDENCIES(CMakeSetup cmake)

View File

@ -51,18 +51,27 @@ bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string>& args)
return false;
}
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[2] == "ALL")
if (args[1] == "ALL")
{
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(),
args[1].c_str(), all);
result.c_str(), all);
return true;
}

View File

@ -90,7 +90,7 @@ public:
virtual const char* GetFullDocumentation()
{
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.";
}

View File

@ -66,7 +66,7 @@ bool cmBuildCommand::InitialPass(std::vector<std::string>& args)
makecommand += "\"";
makecommand += " ";
makecommand += m_Makefile->GetProjectName();
makecommand += ".dsw /MAKE \"ALL_BUILD - Release\" /REBUILD";
makecommand += ".dsw /MAKE \"ALL_BUILD - Release\" ";
}
else
{