diff --git a/Code/Mantid/Build/Jenkins/buildscript b/Code/Mantid/Build/Jenkins/buildscript
index 912a9f446757fd4f8a742d461bfdf73b9a86b50f..0cb408089f3c8b120605a07f0b0b5433658e30be 100755
--- a/Code/Mantid/Build/Jenkins/buildscript
+++ b/Code/Mantid/Build/Jenkins/buildscript
@@ -101,7 +101,7 @@ $SCL_ON_RHEL6 "cmake -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} -DENABLE_CPACK=ON -DMAKE
 # Build step
 ###############################################################################
 $SCL_ON_RHEL6 "cmake --build . -- -j$BUILD_THREADS"
-$SCL_ON_RHEL6 "cmake --build . --target=AllTests -- -j$BUILD_THREADS"
+$SCL_ON_RHEL6 "cmake --build . --target AllTests -- -j$BUILD_THREADS"
 
 ###############################################################################
 # Run the tests
@@ -120,7 +120,7 @@ if [[ "$CLEANBUILD" == true ]]; then
   if [[ $(uname) == 'Darwin' ]]; then
     export MANTIDPATH=$PWD/bin
   fi
-  $SCL_ON_RHEL6 "cmake --build . --target=docs-qthelp"
+  $SCL_ON_RHEL6 "cmake --build . --target docs-qthelp"
 fi
 
 ###############################################################################
@@ -143,7 +143,7 @@ if [[ "$CLEANBUILD" == true ]]; then
   # and labelled by the commit id it was built with. This assumes the Jenkins git plugin
   # has set the GIT_COMMIT environment variable
   if [[ "$ON_RHEL6" == true ]]; then
-    $SCL_ON_RHEL6 "cmake --build --target=docs-html"
+    $SCL_ON_RHEL6 "cmake --build --target docs-html"
     tar -cjf mantiddocs-g${GIT_COMMIT:0:7}.tar.bz2 --exclude='*.buildinfo' --exclude="MantidProject.q*" docs/html
     # The ..._PREFIX argument avoids opt/Mantid directories at the top of the tree
     $SCL_ON_RHEL6 "cpack --config CPackSourceConfig.cmake -D CPACK_PACKAGING_INSTALL_PREFIX="
diff --git a/Code/Mantid/Build/Jenkins/buildscript.bat b/Code/Mantid/Build/Jenkins/buildscript.bat
index dcd64158366ab9d764506ec6ad967a944b8e3ef9..8c2b16a4b55fa4bb617a4cf01da1f2dd9d93772e 100755
--- a/Code/Mantid/Build/Jenkins/buildscript.bat
+++ b/Code/Mantid/Build/Jenkins/buildscript.bat
@@ -61,7 +61,11 @@ if ERRORLEVEL 1 exit /B %ERRORLEVEL%
 :: Build step
 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
-"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" --build . -- /nologo /m:%BUILD_THREADS% /nr:false /p:Configuration=%BUILD_CONFIG% Mantid.sln
+"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" .
+"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" --build . -- /nologo /m:%BUILD_THREADS% /nr:false
+if ERRORLEVEL 1 exit /B %ERRORLEVEL%
+"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" --target AllTests .
+"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" --build . --target AllTests -- /nologo /m:%BUILD_THREADS% /nr:false
 if ERRORLEVEL 1 exit /B %ERRORLEVEL%
 
 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -75,7 +79,8 @@ if ERRORLEVEL 1 exit /B %ERRORLEVEL%
 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 if "%CLEANBUILD%" EQU "yes" (
     :: Build offline documentation
-    C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" --build . -- /nologo /nr:false /p:Configuration=%BUILD_CONFIG% docs/docs-qthelp.vcxproj
+    "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" . --target docs-qthelp
+    "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" --build . --target docs-qthelp -- /nologo /m:%BUILD_THREADS% /nr:false
 
     :: ignore errors as the exit code of the build isn't correct
     ::if ERRORLEVEL 1 exit /B %ERRORLEVEL%