Selaa lähdekoodia

Further refinement of CxxTest install with SuperBuild

lagkey
Trevor Irons 6 vuotta sitten
vanhempi
commit
2c51b8f080
2 muutettua tiedostoa jossa 33 lisäystä ja 14 poistoa
  1. 19
    13
      CMake/SuperBuild.cmake
  2. 14
    1
      CMakeLists.txt

+ 19
- 13
CMake/SuperBuild.cmake Näytä tiedosto

@@ -10,8 +10,9 @@ else()
10 10
 	    GIT_TAG "3.3.3" #"default"
11 11
    	    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
12 12
    	    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
13
-        #CONFIGURE_COMMAND ""
14
-        #BUILD_COMMAND ""
13
+		#CONFIGURE_COMMAND ""
14
+		#BUILD_COMMAND     ""
15
+		#INSTALL_COMMAND     ""
15 16
     )
16 17
     
17 18
     # Are these necessary?
@@ -53,27 +54,32 @@ if (LEMMA_ENABLE_TESTING)
53 54
     if (CXXTEST_FOUND)
54 55
         message( STATUS "CxxTest was found" )
55 56
     else()
56
-	    message( STATUS "CxxTest WAS NOT FOUND") 
57
+	    message( STATUS "CxxTest WAS NOT FOUND")
58
+        ## CxxTest has no installation per se, it uses python  
57 59
 	    ExternalProject_Add(CxxTest
58 60
 		    GIT_REPOSITORY "https://github.com/CxxTest/cxxtest.git"
59 61
 		    GIT_TAG "master"
60 62
 		    UPDATE_COMMAND ""
61 63
 		    PATCH_COMMAND ""
62
-		    CONFIGURE_COMMAND ""
63
-		    BUILD_COMMAND ""
64
-		    INSTALL_COMMAND ""
65 64
     	    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest
66
-    	    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} /
67
-                       -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
68
-                       -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
65
+    	    #CMAKE_ARGS -DCXXTEST_INCLUDE_DIR="${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/" 
66
+            #           -DCXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen"
67
+            #-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} /
68
+            #           -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
69
+            #           -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
70
+		    CONFIGURE_COMMAND ""
71
+		    BUILD_COMMAND     ""
72
+		    INSTALL_COMMAND   ""
73
+	    #set (CXXTEST_INCLUDE_DIR  "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/" CACHE PATH) #  PATH "" FORCE )
74
+	    #set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen" CACHE PATH) # PATH "" FORCE )
69 75
 	    )
70 76
         #enable_testing()
71 77
 	    # The values "CACHE PATH "" FORCE" makes the GUI show the values of the local CxxTest, but this can cause issues 
72 78
 	    # with users wanting to specify their own path. However, the SuperBuild needs this, in theory you are only here 
73
-        # because a usable CXXTEST was not already found on the machine, so likely this is sane to do  
74
-	    set (CXXTEST_INCLUDE_DIR  "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/" CACHE  PATH "" FORCE )
75
-	    set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen" CACHE PATH "" FORCE )
76
-	    find_package(CxxTest REQUIRED)
79
+        # because a usable CXXTEST was not already found on the machine, so likely this is sane to do 
80
+	    #set (CXXTEST_INCLUDE_DIR  "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/"  CACHE PATH "" FORCE )
81
+	    #set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen" CACHE PATH "" FORCE )
82
+	    #find_package(CxxTest REQUIRED)
77 83
     endif()
78 84
 endif()
79 85
 

+ 14
- 1
CMakeLists.txt Näytä tiedosto

@@ -36,7 +36,17 @@ endif()
36 36
 ## Optional Dependencies
37 37
 if (LEMMA_ENABLE_TESTING)
38 38
     message (STATUS "LEMMA_ENABLE_TESTING is set" )
39
-    #find_package (CxxTest QUIET)            # Unit testing 
39
+    #find_package (CxxTest QUIET)            # Unit testing
40
+    if (EXISTS  "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/cxxtest")
41
+	    set (CXXTEST_INCLUDE_DIR  "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/" CACHE PATH "" FORCE)
42
+    else()
43
+	    set (CXXTEST_INCLUDE_DIR  "CXXTEST_INCLUDE_DIR-NOTFOUND" CACHE PATH "" FORCE)
44
+    endif()
45
+    if (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen")
46
+	    set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen" CACHE PATH "" FORCE) 
47
+    else()
48
+	    set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "CXXTEST_PYTHON_TESTGEN_EXECUTABLE-NOTFOUND" CACHE PATH "" FORCE) 
49
+    endif ()
40 50
     find_package (CxxTest)            # Unit testing 
41 51
     message (STATUS "CXXTEST_FOUND ${CxxTest_FOUND}" )
42 52
 endif()
@@ -61,6 +71,9 @@ if ( NOT Eigen3_FOUND OR
61 71
   	# execute the superbuild (this script will be invoked again without the
62 72
   	# USE_SUPERBUILD option this time)
63 73
   	include (CMake/SuperBuild.cmake)
74
+
75
+    #add_dependencies(SUPERBUILD CxxTest) 
76
+
64 77
   	return()                      # stop processing this file further
65 78
 else()
66 79
 	#project (Blah)                # <-- YOUR PROJECT NAME HERE

Loading…
Peruuta
Tallenna