Преглед на файлове

Better warnings about 8.90

iss7
Trevor Irons преди 5 години
родител
ревизия
21ae0ab38b
променени са 2 файла, в които са добавени 42 реда и са изтрити 16 реда
  1. 1
    13
      CMake/SuperBuild.cmake
  2. 41
    3
      CMakeLists.txt

+ 1
- 13
CMake/SuperBuild.cmake Целия файл

@@ -38,20 +38,8 @@ else()
38 38
 endif()
39 39
 
40 40
 if ( LEMMA_VTK8_SUPPORT )
41
-    find_package(VTK 8)
42
-#   find_package(VTK 8.9 COMPONENTS vtkCommonCore vtkRenderingCore vtkFiltersCore vtkFiltersSources 
43
-#           vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkIOGeometry vtkInteractionStyle 
44
-#           vtkRenderingAnnotation vtkFiltersHybrid vtkFiltersModeling vtkRenderingVolumeOpenGL2 NO_MODULE)
45
-    #find_package(VTK 8 NO_MODULE) 
46
-            #vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkIOGeometry vtkInteractionStyle 
47
-            #vtkRenderingAnnotation vtkFiltersHybrid vtkFiltersModeling vtkRenderingVolumeOpenGL2 NO_MODULE)
48 41
     if ( NOT VTK_FOUND OR  VTK_VERSION VERSION_GREATER "8.2.0" )
49
-        #message(FATAL_ERROR "VTK 8 was found, but the wrong one! " ${VTK_VERSION}, ${VTK_MINOR_VERSION}, ${VTK_USE_FILE} ) 
50
-        #endif()
51
-        #if ( VTK_VERSION VERSION_GREATER "8.20.0" ) # or VTK_DIR-NOTFOUND)
52
-        #message( AUTHOR_WARNING  "VTK > 8.20.0 was found! " ${VTK_VERSION}, ${VTK_MINOR_VERSION}, ${VTK_USE_FILE} )
53
-        #message( FATAL_ERROR  "VTK > 8.20.0 was found! Version found: " ${VTK_VERSION}, ${VTK_USE_FILE} )
54
-        message( STATUS  "VTK > 8.20.0 was found! Version found: " ${VTK_VERSION}, ${VTK_USE_FILE} )
42
+        message( STATUS "VTK > 8.20.0 was found! Version found: " ${VTK_VERSION}, ${VTK_USE_FILE} )
55 43
         message( STATUS "External build of VTK 8 has been added, this may take some time to build." )
56 44
         ExternalProject_Add(VTK8
57 45
         GIT_REPOSITORY "https://gitlab.kitware.com/vtk/vtk.git"

+ 41
- 3
CMakeLists.txt Целия файл

@@ -60,18 +60,56 @@ if (CMAKE_CROSSCOMPILING)
60 60
     project (CHECKSUPERBUILD CXX) # Necessary for VTK query 
61 61
     find_package (yaml-cpp 0.6         PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH) # Serialisation of classes 
62 62
     find_package (Eigen3   3.3         PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH) # Matrix/Vector & Math
63
-    if (LEMMA_VTK8_SUPPORT)
64
-        find_package (VTK  8.2.0 EXACT PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH) # Visualization 
63
+    if (LEMMA_VTK8_SUPPORT)                                                            # Visualisation 
64
+        find_package (VTK  8.2.0       PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH 
65
+        COMPONENTS 
66
+        vtkCommonCore 
67
+        vtkRenderingCore 
68
+        vtkFiltersCore 
69
+        vtkFiltersSources 
70
+        vtkCommonDataModel 
71
+        vtkFiltersHyperTree 
72
+        vtkIOXML 
73
+        vtkIOImage 
74
+        vtkIOLegacy 
75
+        vtkIOGeometry 
76
+        vtkInteractionStyle 
77
+        vtkRenderingAnnotation 
78
+        vtkFiltersHybrid 
79
+        vtkFiltersModeling 
80
+        vtkRenderingVolumeOpenGL2
81
+        QUIET 
82
+        ) 
65 83
     endif()
66 84
 else()
67 85
     find_package (Eigen3   3.3 QUIET )  # Matrix/Vector & Math
68 86
     find_package (yaml-cpp 0.6 QUIET )  # Serialisation of classes 
69 87
     if (LEMMA_VTK8_SUPPORT)
70
-        find_package (VTK  8.2 QUIET )  # Visualization 
88
+        find_package (VTK  8.2 COMPONENTS
89
+        vtkCommonCore 
90
+        vtkRenderingCore 
91
+        vtkFiltersCore 
92
+        vtkFiltersSources 
93
+        vtkCommonDataModel 
94
+        vtkFiltersHyperTree 
95
+        vtkIOXML 
96
+        vtkIOImage 
97
+        vtkIOLegacy 
98
+        vtkIOGeometry 
99
+        vtkInteractionStyle 
100
+        vtkRenderingAnnotation 
101
+        vtkFiltersHybrid 
102
+        vtkFiltersModeling 
103
+        vtkRenderingVolumeOpenGL2 
104
+        QUIET )  
71 105
     endif()
72 106
 endif()
73 107
 
74 108
 INCLUDE_DIRECTORIES(${YAML_CPP_INCLUDE_DIR})
109
+if (VTK_VERSION VERSION_GREATER "8.2.0")
110
+    message( STATUS "${VTK_VERSION} is compatible??  ${VTK_VERSION_COMPATIBLE}")
111
+    set (VTK_FOUND False) 
112
+endif()
75 113
 if (VTK_FOUND)
76 114
     set(volumeRenderer volumerenderer.cxx)
77 115
 	add_definitions(-DLEMMAUSEVTK) 

Loading…
Отказ
Запис