summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-04-08 14:40:57 (GMT)
committerBrad King <brad.king@kitware.com>2011-04-08 19:36:16 (GMT)
commit06fcbc4757c7a52733a554d4050735452d49a5e7 (patch)
treeec735575eb956a5a5ea873b87e0e43ea6c73168d /Source/cmLocalVisualStudioGenerator.h
parenta961ecdad0ec31bacb3f6abff83aa65f0b51a676 (diff)
downloadCMake-06fcbc4757c7a52733a554d4050735452d49a5e7.zip
CMake-06fcbc4757c7a52733a554d4050735452d49a5e7.tar.gz
CMake-06fcbc4757c7a52733a554d4050735452d49a5e7.tar.bz2
VS10: Fix working directory of consecutive custom commands (#11938)
The VS 10 msbuild tool uses a single command shell to invoke all the custom command scripts in a project. Isolate the environment and working directory of custom commands using setlocal/endlocal. The form of each command is set errlev= setlocal cd c:\work\dir if %errorlevel% neq 0 goto :cmEnd c: if %errorlevel% neq 0 goto :cmEnd command1 ... if %errorlevel% neq 0 goto :cmEnd ... commandN ... if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & set errlev=%errorlevel% if %errlev% neq 0 goto :VCEnd so that all changes to the environment and working directory are isolated within the script and the return code is preserved.
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.h')
-rw-r--r--Source/cmLocalVisualStudioGenerator.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h
index 22112b3..278291e 100644
--- a/Source/cmLocalVisualStudioGenerator.h
+++ b/Source/cmLocalVisualStudioGenerator.h
@@ -37,13 +37,12 @@ public:
const char* configName,
const char* newline = "\n");
- /** Line of batch file text that skips to the end after
- * a failed step in a sequence of custom commands.
- */
- std::string GetCheckForErrorLine();
+ /** Label to which to jump in a batch file after a failed step in a
+ sequence of custom commands. */
+ const char* GetReportErrorLabel() const;
protected:
- virtual std::string CheckForErrorLine();
+ virtual const char* ReportErrorLabel() const;
/** Construct a custom command to make exe import lib dir. */
cmsys::auto_ptr<cmCustomCommand>