@@ -64,60 +64,6 @@ EM_ASM(
64
64
itk_module_target_label (${KIT} TestDriver )
65
65
endmacro ()
66
66
67
-
68
- macro (CreateTestDriver_SupportBuildInIOFactories KIT KIT_LIBS KitTests )
69
- set (ADDITIONAL_SRC ${ARGN} )
70
- if (EMSCRIPTEN )
71
- set (emscripten_before "
72
- EM_ASM(
73
- var cmake_source_dir = '${CMAKE_SOURCE_DIR} '.split('/');
74
- // This is intentionally global so it can be unmounted at the end.
75
- source_mount_dir = null;
76
- if(cmake_source_dir[1] === 'home') {
77
- source_mount_dir = cmake_source_dir.slice(0, 3).join('/');
78
- }
79
- else {
80
- source_mount_dir = cmake_source_dir.slice(0, 2).join('/');
81
- }
82
- FS.mkdir(source_mount_dir);
83
- FS.mount(NODEFS, { root: source_mount_dir }, source_mount_dir);
84
-
85
- // This is intentionally global so it can be unmounted at the end.
86
- binary_mount_dir = null;
87
- var cmake_binary_dir = '${CMAKE_BINARY_DIR} '.split('/');
88
- if(cmake_binary_dir[1] === 'home') {
89
- binary_mount_dir = cmake_binary_dir.slice(0, 3).join('/');
90
- }
91
- else {
92
- binary_mount_dir = cmake_binary_dir.slice(0, 2).join('/');
93
- }
94
- if(source_mount_dir != binary_mount_dir) {
95
- FS.mkdir(binary_mount_dir);
96
- FS.mount(NODEFS, { root: binary_mount_dir }, binary_mount_dir);
97
- }
98
- );
99
- " )
100
- set (emscripten_after "
101
- EM_ASM(
102
- FS.unmount(source_mount_dir);
103
- if(source_mount_dir != binary_mount_dir) {
104
- FS.unmount(binary_mount_dir);
105
- }
106
- );
107
- " )
108
- endif ()
109
- set (CMAKE_TESTDRIVER_BEFORE_TESTMAIN "${emscripten_before} #include \" itkTestDriverBeforeTest.inc\" " )
110
- set (CMAKE_TESTDRIVER_AFTER_TESTMAIN "#include \" itkTestDriverAfterTest.inc\" ${emscripten_after} " )
111
- create_test_sourcelist (Tests ${KIT} TestDriver.cxx
112
- ${KitTests}
113
- EXTRA_INCLUDE itkTestDriverIncludeBuiltInIOFactories.h
114
- FUNCTION ProcessArgumentsAndRegisterBuiltInFactories
115
- )
116
- add_executable (${KIT} TestDriver ${KIT} TestDriver.cxx ${Tests} ${ADDITIONAL_SRC} )
117
- target_link_libraries (${KIT} TestDriver LINK_PUBLIC ${KIT_LIBS} ${ITKTestKernel_LIBRARIES} )
118
- itk_module_target_label (${KIT} TestDriver )
119
- endmacro ()
120
-
121
67
#-----------------------------------------------------------------------------
122
68
# ITK wrapper for add_test that automatically sets the test's LABELS property
123
69
# to the value of its containing module.
0 commit comments