COMP: Move CMake's include(ITKWindowsUtf8) for external modules#6244
COMP: Move CMake's include(ITKWindowsUtf8) for external modules#6244hjmjohnson merged 1 commit intoInsightSoftwareConsortium:mainfrom
Conversation
The inclusion in the root CMakeLists.txt was causing the following configure error when compiling a module externally: ``` CMake Error at C:/src/itk/ITK-main/CMake/ITKModuleTest.cmake:93 (itk_target_attach_windows_utf8_manifest): Unknown CMake command "itk_target_attach_windows_utf8_manifest". Call Stack (most recent call first): test/CMakeLists.txt:22 (createtestdriver) ```
|
Caused by #6209 @hjmjohnson. |
|
| Filename | Overview |
|---|---|
| CMakeLists.txt | Removes the now-redundant top-level include(ITKWindowsUtf8); the include is now co-located with its user in ITKModuleTest.cmake and will still be processed before any module source CMakeLists.txt in both in-tree and external builds. |
| CMake/ITKModuleTest.cmake | Adds include(ITKWindowsUtf8) at file scope so itk_target_attach_windows_utf8_manifest is always defined when CreateTestDriver or CreateGoogleTestDriver call it, fixing the Unknown CMake command error for external module builds. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Root CMakeLists.txt] -->|include| B[ITKModuleMacros]
A -->|include| C[ITKExternalData]
A -->|include| D[ITKModuleTest.cmake]
D -->|include| E[ITKWindowsUtf8.cmake]
E -->|defines| F[itk_target_attach_windows_utf8_manifest]
D -->|defines| G[CreateTestDriver]
D -->|defines| H[CreateGoogleTestDriver]
G -->|calls| F
H -->|calls| F
I[External Module Build] -->|include| D
J[Modules/Core/TestKernel/src/CMakeLists.txt] -->|calls directly| F
style E fill:#90EE90
style F fill:#90EE90
Reviews (1): Last reviewed commit: "COMP: Move CMake's include(ITKWindowsUtf..." | Re-trigger Greptile
0997958
into
InsightSoftwareConsortium:main
The inclusion in the root CMakeLists.txt was causing the following configure error when compiling a module externally:
See e.g. https://my.cdash.org/builds/3530626/configure.
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.