View Issue Details

IDProjectCategoryView StatusLast Update
0001846Slicer4Core: CLI infrastructurepublic2012-08-21 09:47
Reporterpinter Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.0.1 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0001846: Loadable module title is always the directory name
Description

I created a module with a name that consists of more words, so I would like to see that module in the module list with spaces between the words, but I cannot make it happen. What I'm trying in the CMakeLists.txt is the following, however it does not work:
"
set(EXTENSION_NAME DoseVolumeHistogram)
...
set(qt_module_name "DoseVolumeHistogram")
set(qt_module_title "Dose Volume Histogram")
"

What is strange that the same thing seems to work in case of modules like SlicerWelcome, CropVolume, SceneViews etc.

Additional Information

Te module in question can be found here in the DoseVolumeHistogram directory:
https://subversion.assembla.com/svn/sparkit/trunk/SlicerRt/src

TagsNo tags attached.

Activities

finetjul

finetjul

2012-05-10 04:57

administrator   ~0004283

Are you sure qt_module_title is passed to slicerMacroBuildQtModule in your cmakelists ?
and that qSlicerGetTitleMacro(QTMODULE_TITLE); is defined in your qSlicerDoseVolumeHistogramModule header ?

I agree that the title should be set the same way all across the modules (not the case).

pinter

pinter

2012-05-11 07:53

developer   ~0004320

I added the row
TITLE ${qt_module_title}
in the slicerMacroBuildQtModule macro in the module's CMakeLists.txt and the module name appears correctly, thanks!

However, the qSlicerGetTitleMacro(QTMODULE_TITLE) fails to compile in the header, because the module name is not in quotation marks.
The funny thing is that I have two very similar modules, and this problem occurs only with the one whose skeleton I generated yesterday with the python module template generator. The older one works fine, the macro's value (the module title with spaces) is between quotation marks.

jcfr

jcfr

2012-05-11 10:31

administrator   ~0004328

Looking at the build log, the title is quoted. Indeed the parameter is passed as: -DQTMODULE_TITLE="\"Bar Foo\""

I am assuming this occurs on Windows ?

[20%] Building CXX object CMakeFiles/qSlicerLoadableExtensionTemplateModule.dir/moc_qSlicerLoadableExtensionTemplateModule.cxx.o
/usr/local/bin/c++ -DqSlicerLoadableExtensionTemplateModule_EXPORTS -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_TEST_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQTMODULE_TITLE="\"Bar Foo\""

pinter

pinter

2012-05-11 11:04

developer   ~0004330

Yes, it is Windows.
What I have in the build log is ... /D "QTMODULE_TITLE=Dose Accumulation" ...

jcfr

jcfr

2012-05-11 18:10

administrator   ~0004344

It seems the problem is not related to the fact of having space in a preprocessing symbol. After doing a small test on windows (VS2008 / 64bit / CMake 2.8.8), it doesn't seem to cause trouble. See enclosed sceenshot.

2012-05-11 18:11

 

pinter

pinter

2012-05-11 18:36

developer   ~0004346

Yes, this problem does not occur in every case. As I said, one of two modules (both of which I created practically the same way) works like yours, and the other has the issue of the missing quotation marks. As the relevant parts in the CMakeList files are the same, I have no idea what can be the difference that causes this.
I also use VS2008 / 64bit / CMake 2.8.8.
The two modules in question are
https://subversion.assembla.com/svn/slicerrt/trunk/SlicerRt/src/DoseVolumeHistogram <- works fine in this sense
https://subversion.assembla.com/svn/slicerrt/trunk/SlicerRt/src/DoseAccumulation <- quotation mark issue
I'll try with a clean build, but in the meantime I would really appreciate if you could take a quick glance at these modules (the CMakeLists.txt and the ...Module.h files).
Thanks!

jcfr

jcfr

2012-05-11 18:54

administrator   ~0004353

Let me know if a clean build prevent the issue from occuring.

I reviewed both main CMakeLists, I created an issue and added my comment to it. See 0002026

pinter

pinter

2012-05-14 10:12

developer   ~0004376

The clean build solved the issue.
Thank you very much both for your help!

jcfr

jcfr

2012-05-14 10:15

administrator   ~0004377

Excellent - if everything is working as expected, please consider closing this issue.

pinter

pinter

2012-05-14 10:17

developer   ~0004378

Yes, everything works fine, thanks again!

Issue History

Date Modified Username Field Change
2012-03-28 13:34 pinter New Issue
2012-05-10 04:56 finetjul Status new => assigned
2012-05-10 04:56 finetjul Assigned To => jcfr
2012-05-10 04:57 finetjul Note Added: 0004283
2012-05-11 07:53 pinter Note Added: 0004320
2012-05-11 10:31 jcfr Note Added: 0004328
2012-05-11 10:31 jcfr Status assigned => feedback
2012-05-11 11:04 pinter Note Added: 0004330
2012-05-11 18:10 jcfr Note Added: 0004344
2012-05-11 18:10 jcfr File Added: Windows-vs2008-64bit-CMake-2-8-8_PreprocessorSymbolWithSpace.png
2012-05-11 18:11 jcfr File Deleted: Windows-vs2008-64bit-CMake-2-8-8_PreprocessorSymbolWithSpace.png
2012-05-11 18:11 jcfr File Added: Windows-vs2008-64bit-CMake-2-8-8_PreprocessorSymbolWithSpace.png
2012-05-11 18:36 pinter Note Added: 0004346
2012-05-11 18:54 jcfr Note Added: 0004353
2012-05-14 10:12 pinter Note Added: 0004376
2012-05-14 10:15 jcfr Note Added: 0004377
2012-05-14 10:15 jcfr Status feedback => resolved
2012-05-14 10:15 jcfr Fixed in Version => Slicer 4.2.0 AHM Summer 2012
2012-05-14 10:15 jcfr Resolution open => fixed
2012-05-14 10:17 pinter Note Added: 0004378
2012-05-14 10:17 pinter Status resolved => closed
2012-08-21 09:47 jcfr Target Version => Slicer 4.2.0 - Feature freeze Sept 1st 2012