Browse Source

Further refinement of CxxTest install with SuperBuild

lagkey
Trevor Irons 6 years ago
parent
commit
2c51b8f080
2 changed files with 33 additions and 14 deletions
  1. 19
    13
      CMake/SuperBuild.cmake
  2. 14
    1
      CMakeLists.txt

+ 19
- 13
CMake/SuperBuild.cmake View File

10
 	    GIT_TAG "3.3.3" #"default"
10
 	    GIT_TAG "3.3.3" #"default"
11
    	    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
11
    	    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
12
    	    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
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
     # Are these necessary?
18
     # Are these necessary?
53
     if (CXXTEST_FOUND)
54
     if (CXXTEST_FOUND)
54
         message( STATUS "CxxTest was found" )
55
         message( STATUS "CxxTest was found" )
55
     else()
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
 	    ExternalProject_Add(CxxTest
59
 	    ExternalProject_Add(CxxTest
58
 		    GIT_REPOSITORY "https://github.com/CxxTest/cxxtest.git"
60
 		    GIT_REPOSITORY "https://github.com/CxxTest/cxxtest.git"
59
 		    GIT_TAG "master"
61
 		    GIT_TAG "master"
60
 		    UPDATE_COMMAND ""
62
 		    UPDATE_COMMAND ""
61
 		    PATCH_COMMAND ""
63
 		    PATCH_COMMAND ""
62
-		    CONFIGURE_COMMAND ""
63
-		    BUILD_COMMAND ""
64
-		    INSTALL_COMMAND ""
65
     	    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest
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
         #enable_testing()
76
         #enable_testing()
71
 	    # The values "CACHE PATH "" FORCE" makes the GUI show the values of the local CxxTest, but this can cause issues 
77
 	    # The values "CACHE PATH "" FORCE" makes the GUI show the values of the local CxxTest, but this can cause issues 
72
 	    # with users wanting to specify their own path. However, the SuperBuild needs this, in theory you are only here 
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
     endif()
83
     endif()
78
 endif()
84
 endif()
79
 
85
 

+ 14
- 1
CMakeLists.txt View File

36
 ## Optional Dependencies
36
 ## Optional Dependencies
37
 if (LEMMA_ENABLE_TESTING)
37
 if (LEMMA_ENABLE_TESTING)
38
     message (STATUS "LEMMA_ENABLE_TESTING is set" )
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
     find_package (CxxTest)            # Unit testing 
50
     find_package (CxxTest)            # Unit testing 
41
     message (STATUS "CXXTEST_FOUND ${CxxTest_FOUND}" )
51
     message (STATUS "CXXTEST_FOUND ${CxxTest_FOUND}" )
42
 endif()
52
 endif()
61
   	# execute the superbuild (this script will be invoked again without the
71
   	# execute the superbuild (this script will be invoked again without the
62
   	# USE_SUPERBUILD option this time)
72
   	# USE_SUPERBUILD option this time)
63
   	include (CMake/SuperBuild.cmake)
73
   	include (CMake/SuperBuild.cmake)
74
+
75
+    #add_dependencies(SUPERBUILD CxxTest) 
76
+
64
   	return()                      # stop processing this file further
77
   	return()                      # stop processing this file further
65
 else()
78
 else()
66
 	#project (Blah)                # <-- YOUR PROJECT NAME HERE
79
 	#project (Blah)                # <-- YOUR PROJECT NAME HERE

Loading…
Cancel
Save