Hi all, could I have some feedback on my github pull request ?
Hi all,
I would like to do the final step: put the content of the new vtkSlicerVersionConfigure.h into a resource file which is read at runtime in /home/aymeric/dev/slicer/Base/QTCore/qSlicerCoreApplication.cxx.
Did you already plan to do it ?
Do you have any idea/advice to implement it correctly ?
Best regards
Since the current use of the macro is for conditionally including code at compile time, i am not this approach would work here.
That said, i suggest we list the current use of the macros to make the final call.
I have not found code which uses the constant of vtkSlicerVersionConfigure.h (not vtkSlicerVersionConfigureMinimal.h) in #if or #ifdef statements.
Am I wrong ?
Inspecting the source files, we can see the following files directly including vtkSlicerVersionConfigure.h
:
$ pwd
/path/to/Slicer
$ ack --cpp vtkSlicerVersionConfigure\.h
Base/Logic/Testing/vtkSlicerVersionConfigureTest1.cxx
21:#include "vtkSlicerVersionConfigure.h"
Base/QTGUI/qSlicerApplication.cxx
41:#include <vtkSlicerVersionConfigure.h> // For Slicer_VERSION_FULL
Base/QTApp/qSlicerApplicationHelper.cxx
43:#include "vtkSlicerVersionConfigure.h" // For Slicer_MAIN_PROJECT_VERSION_FULL
Base/QTCore/Testing/Cxx/qSlicerUtilsTest1.cxx
36:#include "vtkSlicerVersionConfigure.h"
Base/QTCore/qSlicerCoreApplication.cxx
138:#include "vtkSlicerVersionConfigure.h"
Applications/SlicerApp/Main.cxx
25:#include "vtkSlicerVersionConfigure.h" // For Slicer_VERSION_FULL
… then reading the comments in the respective .cxx
files you will be able to assess which macro are used.
After modifying vtkSlicerVersionConfigure.h
, the following executable and libraries are rebuilt:
bin/SlicerBaseLogicCxxTests
bin/libqSlicerBaseQTCore.so
bin/qSlicerBaseQTCoreCxxTests
libqSlicerBaseQTGUI.so
libqSlicerBaseQTApp.so
SlicerApp-real
Details output:
$ touch vtkSlicerVersionConfigure.h
$ make
[ 0%] Configuring vtkSlicerVersionConfigure.h
-- Configuring Slicer release type [Experimental]
-- Found Git: /usr/bin/git
-- Configuring Slicer version [5.5.0-2023-08-21]
-- Configuring Slicer revision [32141]
[ 0%] Built target SlicerConfigureVersionHeader
[...]
[ 42%] Building CXX object Base/Logic/Testing/CMakeFiles/SlicerBaseLogicCxxTests.dir/vtkSlicerVersionConfigureTest1.cxx.o
[ 42%] Linking CXX executable ../../../bin/SlicerBaseLogicCxxTests
[...]
[ 42%] Building CXX object Base/QTCore/CMakeFiles/qSlicerBaseQTCore.dir/qSlicerCoreApplication.cxx.o
[ 42%] Linking CXX shared library ../../bin/libqSlicerBaseQTCore.so
[...]
[ 43%] Building CXX object Base/QTCore/Testing/Cxx/CMakeFiles/qSlicerBaseQTCoreCxxTests.dir/qSlicerUtilsTest1.cxx.o
[ 43%] Linking CXX executable ../../../../bin/qSlicerBaseQTCoreCxxTests
[...]
[ 43%] Building CXX object Base/QTGUI/CMakeFiles/qSlicerBaseQTGUI.dir/qSlicerApplication.cxx.o
[ 44%] Linking CXX shared library ../../bin/libqSlicerBaseQTGUI.so
[...]
[ 50%] Building CXX object Base/QTApp/CMakeFiles/qSlicerBaseQTApp.dir/qSlicerApplicationHelper.cxx.o
[ 50%] Linking CXX shared library ../../bin/libqSlicerBaseQTApp.so
[...]
[ 95%] Built target qSlicerApp
Consolidate compiler generated dependencies of target SlicerApp
[ 95%] Building CXX object Applications/SlicerApp/CMakeFiles/SlicerApp.dir/Main.cxx.o
[ 95%] Linking CXX executable ../../bin/SlicerApp-real
[...]
[100%] Built target SlicerDesignerConfigureLauncher