]> OCCT Git - occt.git/commitdiff
Configuration - VCPKG add GTest feature (#616)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Mon, 14 Jul 2025 21:15:51 +0000 (22:15 +0100)
committerGitHub <noreply@github.com>
Mon, 14 Jul 2025 21:15:51 +0000 (22:15 +0100)
- Bumped OCCT version from 7.8.1 to 8.0.0 and updated the documentation URL.
- Enhanced descriptions for existing vcpkg features and introduced a “gtest” feature in vcpkg.json.
- Modified CMakeLists.txt to add/unset the GTest vcpkg feature and reorganized test setup calls.

.github/actions/run-gtest/action.yml
CMakeLists.txt
adm/vcpkg/vcpkg.json

index d3fb85d625c72b53a03b60aa97e344f748eb273f..f9d11f6a9c5be5d80dfb844eea1e486f15cf35fa 100644 (file)
@@ -58,7 +58,6 @@ runs:
       run: |
         cd install
         call env.bat vc14 win64 release
-        cd bin
         set GTEST_OUTPUT=""
         OpenCascadeGTest.exe --gtest_output=xml:gtest_results.xml > gtest_output.log 2>&1
         type gtest_output.log
@@ -82,8 +81,8 @@ runs:
       with:
         name: gtest-results-${{ inputs.platform }}-${{ inputs.compiler }}-${{ inputs.artifact-suffix }}
         path: |
-          install/bin/gtest_results.xml
-          install/bin/gtest_output.log
+          install/**/gtest_results.xml
+          install/**/gtest_output.log
         retention-days: 15
 
     - name: Check for test failures on Windows
@@ -91,7 +90,7 @@ runs:
       id: check-failures-windows
       shell: pwsh
       run: |
-        cd install/bin
+        cd install
         $log = Get-Content "gtest_output.log" -Raw
         if ($log -match "\[\s+FAILED\s+\]") {
           Write-Error "GTest failures detected in the output."
index 2dba1d43076215d190cf2df9577aedccfeb965c7..fcdc8cea7774cabfa4d2f4c01081ca82b50b05be 100644 (file)
@@ -759,6 +759,17 @@ else()
   OCCT_CHECK_AND_UNSET ("INSTALL_JEMALLOC")
 endif()
 
+# GTest
+if (BUILD_GTEST)
+  OCCT_ADD_VCPKG_FEATURE ("gtest")
+  list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/gtest")
+else()
+  OCCT_UNSET_VCPKG_FEATURE ("gtest")
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GTEST")
+  OCCT_CHECK_AND_UNSET_GROUP ("GTest")
+  OCCT_CHECK_AND_UNSET ("INSTALL_GTEST")
+endif()
+
 # qt for samples
 if (BUILD_SAMPLES_QT)
   # check qt 3rdparty path
@@ -1198,7 +1209,6 @@ endforeach()
 
 # Setup Google Test integration if enabled
 if (BUILD_GTEST)
-  OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gtest")
   enable_testing()
 
   OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_gtest")
@@ -1212,11 +1222,6 @@ if (BUILD_GTEST)
   
   # Set environment variables for all tests
   OCCT_SET_GTEST_ENVIRONMENT()
-else()
-  # Disable GTest integration if not enabled
-  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GTEST")
-  OCCT_CHECK_AND_UNSET_GROUP ("GTest")
-  OCCT_CHECK_AND_UNSET ("INSTALL_GTEST")
 endif()
 
 if (BUILD_DOC_Overview OR BUILD_DOC_RefMan)
index 81e1829cf79cb3db6362a0f5afc908921f92c370..89d3a2413af720d8ce9c2dda4dc30dc1f46c57f7 100644 (file)
@@ -1,10 +1,10 @@
 {
   "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
   "name": "opencascade",
-  "version": "7.8.1",
+  "version": "8.0.0",
   "description": "Open CASCADE Technology (OCCT) is an open-source software development platform for 3D CAD, CAM, CAE.",
   "homepage": "https://github.com/Open-Cascade-SAS/OCCT",
-  "documentation": "https://github.com/Open-Cascade-SAS/OCCT/wiki",
+  "documentation": "https://dev.opencascade.org/doc/overview/html",
   "license": "LGPL-2.1",
   "dependencies": [
     {
@@ -35,7 +35,7 @@
   ],
   "features": {
     "angle": {
-      "description": "Enables optional usage of OpenGL ES 2.0. Part of the module-visualization.",
+      "description": "Enables OpenGL ES 2.0 through ANGLE project. Required for 3D visualization in OCCT on UWP platform where desktop OpenGL is not available.",
       "dependencies": [
         {
           "name": "angle",
       ]
     },
     "opengl": {
-      "description": "Enables optional usage of OpenGL. Part of the module-visualization.",
+      "description": "Enables OpenGL support for 3D visualization toolkit. Required for OCCT's OpenGL rendering pipeline and graphical display drivers.",
       "dependencies": [
         "opengl"
       ]
     },
     "tcl": {
-      "description": "Enables optional usage of Tcl. Part of the module-foundation-classes.",
+      "description": "Enables Tcl scripting support for OCCT's DRAWEXE test harness and command-line interface. Provides access to OCCT's geometric algorithms through scripting.",
       "dependencies": [
         "tcl"
       ]
     },
     "tcltk": {
-      "description": "Enables optional usage of TclTk. Part of the module-foundation-classes.",
+      "description": "Enables Tcl/Tk GUI support for DRAWEXE test harness. Provides windowed interface for OCCT's geometric modeling and visualization tools.",
       "dependencies": [
         {
           "name": "tcl",
       ]
     },
     "freeimage": {
-      "description": "Enables optional usage of FreeImage. Part of the module-visualization.",
+      "description": "Enables FreeImage support for advanced image file format handling (TIFF, PNG, JPEG, etc.) in OCCT's imaging and visualization components.",
       "dependencies": [
         "freeimage"
       ]
     },
     "freetype": {
-      "description": "Enables optional usage of FreeType. Part of the module-visualization.",
+      "description": "Enables FreeType font rendering engine for high-quality text display in OCCT's 3D visualization and technical drawing output.",
       "supports": "!uwp",
       "dependencies": [
         "fontconfig",
       ]
     },
     "rapidjson": {
-      "description": "Enables optional usage of RapidJSON. Part of the module-data-exchange.",
+      "description": "Enables RapidJSON for efficient JSON parsing and serialization in OCCT's glTF 2.0 import/export functionality.",
       "dependencies": [
         "rapidjson"
       ]
     },
     "tbb": {
-      "description": "Enables optional usage of TBB. Part of the module-foundation-classes.",
+      "description": "Enables Intel Threading Building Blocks for optimized parallel computing. Replaces OCCT's default threading with TBB's task-based parallelism for better performance.",
       "dependencies": [
         "tbb"
       ]
     },
     "vtk": {
-      "description": "Enables optional usage of VTK. Part of the module-visualization.",
+      "description": "Enables VTK (Visualization Toolkit) integration for advanced scientific visualization capabilities and mesh processing in OCCT.",
       "dependencies": [
         {
           "name": "vtk",
       ]
     },
     "draco": {
-      "description": "Enables optional usage of Draco. Part of the module-data-exchange.",
+      "description": "Enables Google Draco geometry compression for efficient mesh storage and transmission in OCCT's glTF 2.0 import/export workflow.",
       "dependencies": [
         "draco"
       ]
     },
     "ffmpeg": {
-      "description": "Enables optional usage of FFmpeg. Part of the module-visualization.",
+      "description": "Enables FFmpeg multimedia framework for video encoding/decoding and animation export capabilities in OCCT's visualization pipeline.",
       "dependencies": [
         "ffmpeg"
       ]
     },
     "openvr": {
-      "description": "Enables optional usage of OpenVR. Part of the module-visualization.",
+      "description": "Enables OpenVR SDK integration for virtual reality support in OCCT's 3D visualization, allowing immersive CAD model exploration.",
       "dependencies": [
         "openvr"
       ]
     },
     "jemalloc": {
-      "description": "Enables optional usage of jemalloc. Part of the module-foundation-classes.",
+      "description": "Enables jemalloc high-performance memory allocator as replacement for system malloc. Improves memory usage patterns for large-scale CAD operations.",
       "dependencies": [
         "jemalloc"
       ]
+    },
+    "gtest": {
+      "description": "Enables Google Test framework for building OCCT's unit test suite. Required for running automated tests and validation of OCCT functionality.",
+      "dependencies": [
+        "gtest"
+      ]
     }
   }
 }
\ No newline at end of file