Browse Source

BUG: Close endif statements with same string as if so that it still configures with CMake 2.4 -- also check for existence of FindCVS.cmake before doing find_package(CVS QUIET) also for CMake 2.4 sake...

David Cole 16 years ago
parent
commit
e0461bbcbc
1 changed files with 9 additions and 6 deletions
  1. 9 6
      Tests/CMakeLists.txt

+ 9 - 6
Tests/CMakeLists.txt

@@ -39,18 +39,21 @@ IF(BUILD_TESTING)
 
   # Should tests that use CVS be run?
   #
-  find_package(CVS)
   set(do_cvs_tests 0)
 
-  if(CVS_EXECUTABLE)
-    set(do_cvs_tests 1)
-  endif()
+  if(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake)
+    find_package(CVS QUIET)
+
+    if(CVS_EXECUTABLE)
+      set(do_cvs_tests 1)
+    endif(CVS_EXECUTABLE)
+  endif(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake)
 
   if(do_cvs_tests AND NOT UNIX)
     if("${CVS_EXECUTABLE}" MATCHES "cygwin")
       set(do_cvs_tests 0)
-    endif()
-  endif()
+    endif("${CVS_EXECUTABLE}" MATCHES "cygwin")
+  endif(do_cvs_tests AND NOT UNIX)
 
   # Should CPack tests be run? By default, yes, but...
   #