summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 e5c8a63..685357b 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 e0a9938..5b29fdd 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 3f9a65d..6320ba6 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 0192b80..3acf4ce 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 2f3d68f..1f06b95 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
{