--- CMakeDetermineVSServicePack.cmake	2010-09-29 20:26:20.530212900 -0500
+++ CMakeDetermineVSServicePackFast.cmake	2010-10-06 07:47:01.231012900 -0500
@@ -7,6 +7,7 @@
 #    vc80sp1
 #    vc90
 #    vc90sp1
+#    vc100
 #
 # Usage:
 # ===========================
@@ -60,16 +61,18 @@ endfunction()
 # in use.  See documentation above.
 function(DetermineVSServicePack _pack)
     if(NOT DETERMINED_VS_SERVICE_PACK OR NOT ${_pack})
-        file(WRITE "${CMAKE_BINARY_DIR}/return0.cc"
-            "int main() { return 0; }\n")
 
-        try_compile(DETERMINED_VS_SERVICE_PACK
-            "${CMAKE_BINARY_DIR}"
-            "${CMAKE_BINARY_DIR}/return0.cc"
-            OUTPUT_VARIABLE _output
-            COPY_FILE "${CMAKE_BINARY_DIR}/return0.cc")
-        
-        file(REMOVE "${CMAKE_BINARY_DIR}/return0.cc")
+        if(EXISTS ${CMAKE_CXX_COMPILER})
+          execute_process(
+              COMMAND ${CMAKE_CXX_COMPILER} /?
+              ERROR_VARIABLE _output
+              OUTPUT_QUIET
+            )
+
+          # cl.exe returns 0 for /?, setting this true to preserve behavior of
+          # the original script.
+          set(DETERMINED_VS_SERVICE_PACK true)
+        endif()
                 
         if(DETERMINED_VS_SERVICE_PACK AND _output)
             string(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+"
