STYLE: Rename CMake ITKElastix project "Elastix" to "ITKElastix"#170
STYLE: Rename CMake ITKElastix project "Elastix" to "ITKElastix"#170N-Dekker wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
Conversation
Aims to avoid confusion between the elastix project and the ITKElastix project. No longer `include(ITKModuleExternal)`
| @@ -1,5 +1,5 @@ | |||
| cmake_minimum_required(VERSION 3.16.3) | |||
| project(Elastix) | |||
| project(ITKElastix) | |||
There was a problem hiding this comment.
Aren't just built-in ITK component supposed to have ITK prefix in their name like this?
There was a problem hiding this comment.
Ah, so that's the reason! Thanks! :-) So what specifically can go wrong when the CMake project of ITKElastix is named "ITKElastix"?
There was a problem hiding this comment.
I think that primary benefit is reduction of confusion. I don't remember whether a prefix in a remote module would throw a wrench in the ITK's build system.
There was a problem hiding this comment.
Yes, the ITK prefix is a marker that the module is a remote vs builtin module. The prefix is also used for Doxygen grouping, possibly others.
There was a problem hiding this comment.
Honestly, I did encounter CMake errors from include(ITKModuleExternal) further on in the file:
Line 99 in 05cde7d
Can you possibly explain what that is for? I mean, is it useful for ITKElastix to do include(ITKModuleExternal)?
There was a problem hiding this comment.
It is, but it's name within ITK is Elastix, not ITKElastix. Similarly to how ITKMontage is called Montage.
There was a problem hiding this comment.
When I renamed project(Elastix) to project(ITKElastix), I got the following errors:
CMake Error at F:/X/Src/I/ITK53RC4/CMake/ITKModuleKWStyleTest.cmake:52 (file):
file failed to open for writing (Permission denied):
/ITKKWStyleFiles.txt
Call Stack (most recent call first):
F:/X/Src/I/ITK53RC4/CMake/ITKModuleMacros.cmake:192 (itk_module_kwstyle_test)
F:/X/Src/I/ITK53RC4/CMake/ITKModuleExternal.cmake:181 (itk_module_impl)
CMakeLists.txt:99 (include)
These came indirectly from calling include(ITKModuleExternal), at CMakeLists line 99. Any idea what it was trying to do? Was it trying to run KWStyle on ITKElastix?
There was a problem hiding this comment.
The project name is expected to be the same as the module name.
There was a problem hiding this comment.
What about PyITKElastix?
There was a problem hiding this comment.
Well, it also provides a interface for C++, soon WebAssembly, so not just Python :-)
If it needs to be changed, perhaps ITKElastixModule, or ...
Aims to avoid confusion between the elastix project and the ITKElastix project.
No longer
include(ITKModuleExternal)