summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-06-26 13:23:55 -0400
committerKen Martin <ken.martin@kitware.com>2001-06-26 13:23:55 -0400
commitc84f6448a64a960c4bf7fb59e313b8afaea3c4e9 (patch)
treefaf584a2d259a62a8f0681ebbcf845b612ecf300 /Source
parent43ac1a3a86193fa72795e98e2d51d3f48209082b (diff)
downloadcmake-c84f6448a64a960c4bf7fb59e313b8afaea3c4e9.tar.gz
modified how paths are escaped, added depends
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt28
-rw-r--r--Source/MFCDialog/CMakeLists.txt1
-rw-r--r--Source/cmAddCustomTargetCommand.cxx17
-rw-r--r--Source/cmAddCustomTargetCommand.h2
-rw-r--r--Source/cmBuildCommand.cxx2
5 files changed, 35 insertions, 15 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index e5c8a638ee..685357b97a 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -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)
diff --git a/Source/MFCDialog/CMakeLists.txt b/Source/MFCDialog/CMakeLists.txt
index e0a99388b3..5b29fdd8d0 100644
--- a/Source/MFCDialog/CMakeLists.txt
+++ b/Source/MFCDialog/CMakeLists.txt
@@ -14,3 +14,4 @@ ADD_DEFINITIONS(-D_AFXDLL)
SET(CMAKE_MFC_FLAG 6)
ADD_EXECUTABLE(CMakeSetup WIN32 SRCS)
+ADD_DEPENDENCIES(CMakeSetup cmake)
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index 3f9a65d38e..6320ba6089 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -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;
}
diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h
index 0192b80bdf..3acf4ce886 100644
--- a/Source/cmAddCustomTargetCommand.h
+++ b/Source/cmAddCustomTargetCommand.h
@@ -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.";
}
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx
index 2f3d68f6c8..1f06b955cc 100644
--- a/Source/cmBuildCommand.cxx
+++ b/Source/cmBuildCommand.cxx
@@ -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
{