25
25
# - Fails if stack is executable. Should only be readable and writable. Not executable.
26
26
# - Program dependencies: perl, readelf
27
27
# - Available for Unix dynamic library builds. Not available otherwise.
28
- # (4) test-instr (Intel(R) MIC Architecture only)
29
- # - Tests Intel(R) MIC Architecture libraries for valid instruction set
30
- # - Fails if finds invalid instruction for Intel(R) MIC Architecture (wasn't compiled with correct flags)
31
- # - Program dependencies: perl, objdump
32
- # - Available for Intel(R) MIC Architecture and i386 builds. Not available otherwise.
33
- # (5) test-deps
28
+ # (4) test-deps
34
29
# - Tests newly created libomp for library dependencies
35
30
# - Fails if sees a dependence not listed in td_exp variable below
36
31
# - Program dependencies: perl, (unix)readelf, (mac)otool[64], (windows)link.exe
@@ -93,7 +88,6 @@ endif()
93
88
macro (libomp_test_touch_recipe test_touch_dir )
94
89
set (libomp_test_touch_dependencies ${LIBOMP_SRC_DIR} /test-touch.c omp )
95
90
set (libomp_test_touch_exe ${test_touch_dir} /test-touch${CMAKE_EXECUTABLE_SUFFIX} )
96
- set (libomp_test_touch_obj ${test_touch_dir} /test-touch${CMAKE_C_OUTPUT_EXTENSION} )
97
91
if (WIN32 )
98
92
if (${RELEASE_BUILD} OR ${RELWITHDEBINFO_BUILD} )
99
93
if (${test_touch_dir} MATCHES "test-touch-mt" )
@@ -108,13 +102,13 @@ macro(libomp_test_touch_recipe test_touch_dir)
108
102
libomp_append (libomp_test_touch_cflags /MDd )
109
103
endif ()
110
104
endif ()
111
- set (libomp_test_touch_out_flags -Fe${libomp_test_touch_exe} -Fo${libomp_test_touch_obj} )
105
+ set (libomp_test_touch_out_flags -Fe${libomp_test_touch_exe} )
112
106
list (APPEND libomp_test_touch_dependencies ompimp )
113
107
else ()
114
108
set (libomp_test_touch_out_flags -o ${libomp_test_touch_exe} )
115
109
endif ()
116
110
add_custom_command (
117
- OUTPUT ${test_touch_dir} /.success ${libomp_test_touch_exe} ${libomp_test_touch_obj}
111
+ OUTPUT ${test_touch_dir} /.success ${libomp_test_touch_exe}
118
112
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR} /${test_touch_dir}
119
113
COMMAND ${CMAKE_COMMAND} -E remove -f ${test_touch_dir} /*
120
114
COMMAND ${libomp_test_touch_compiler} ${libomp_test_touch_out_flags} ${libomp_test_touch_cflags}
@@ -152,22 +146,10 @@ set_target_properties(libomp-test-execstack PROPERTIES FOLDER "OpenMP/Tests")
152
146
add_custom_command(
153
147
OUTPUT test-execstack/.success
154
148
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR} /test-execstack
155
- COMMAND ${PERL_EXECUTABLE } ${LIBOMP_TOOLS_DIR} /check-execstack.pl
156
- --arch= ${LIBOMP_PERL_SCRIPT_ARCH} ${LIBOMP_OUTPUT_DIRECTORY} /${LIBOMP_LIB_FILE}
149
+ COMMAND ${Python3_EXECUTABLE } ${LIBOMP_TOOLS_DIR} /check-execstack.py
150
+ ${LIBOMP_OUTPUT_DIRECTORY} /${LIBOMP_LIB_FILE}
157
151
COMMAND ${CMAKE_COMMAND} -E touch test-execstack/.success
158
- DEPENDS omp
159
- )
160
-
161
- # test-instr
162
- add_custom_target(libomp-test-instr DEPENDS test-instr/.success)
163
- set_target_properties(libomp-test-instr PROPERTIES FOLDER " OpenMP/Tests ")
164
- add_custom_command(
165
- OUTPUT test-instr/.success
166
- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR} /test-instr
167
- COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR} /check-instruction-set.pl --os=${LIBOMP_PERL_SCRIPT_OS}
168
- --arch=${LIBOMP_PERL_SCRIPT_ARCH} --show --mic-arch=${LIBOMP_MIC_ARCH} ${LIBOMP_OUTPUT_DIRECTORY} /${LIBOMP_LIB_FILE}
169
- COMMAND ${CMAKE_COMMAND} -E touch test-instr/.success
170
- DEPENDS omp ${LIBOMP_TOOLS_DIR} /check-instruction-set.pl
152
+ DEPENDS omp ${LIBOMP_TOOLS_DIR} /check-execstack.py
171
153
)
172
154
173
155
# test-deps
@@ -187,7 +169,15 @@ elseif(APPLE)
187
169
set(libomp_expected_library_deps /usr/lib/libSystem.B.dylib)
188
170
elseif(WIN32)
189
171
set(libomp_expected_library_deps kernel32.dll)
190
- libomp_append(libomp_expected_library_deps psapi.dll LIBOMP_OMPT_SUPPORT)
172
+ libomp_append(libomp_expected_library_deps api-ms-win-crt-convert-l1-1-0.dll)
173
+ libomp_append(libomp_expected_library_deps api-ms-win-crt-environment-l1-1-0.dll)
174
+ libomp_append(libomp_expected_library_deps api-ms-win-crt-heap-l1-1-0.dll)
175
+ libomp_append(libomp_expected_library_deps api-ms-win-crt-runtime-l1-1-0.dll)
176
+ libomp_append(libomp_expected_library_deps api-ms-win-crt-stdio-l1-1-0.dll)
177
+ libomp_append(libomp_expected_library_deps api-ms-win-crt-string-l1-1-0.dll)
178
+ libomp_append(libomp_expected_library_deps api-ms-win-crt-utility-l1-1-0.dll)
179
+ libomp_append(libomp_expected_library_deps vcruntime140.dll)
180
+ libomp_append(libomp_expected_library_deps psapi.dll)
191
181
else()
192
182
if(${MIC} )
193
183
set(libomp_expected_library_deps libc.so.6 libpthread.so.0 libdl.so.2)
@@ -202,9 +192,11 @@ else()
202
192
if(${IA32} )
203
193
libomp_append(libomp_expected_library_deps libc.so.6)
204
194
libomp_append(libomp_expected_library_deps ld-linux.so.2)
195
+ libomp_append(libomp_expected_library_deps librt.so.1)
205
196
elseif(${INTEL64} )
206
197
libomp_append(libomp_expected_library_deps libc.so.6)
207
198
libomp_append(libomp_expected_library_deps ld-linux-x86-64.so.2)
199
+ libomp_append(libomp_expected_library_deps librt.so.1)
208
200
elseif(${ARM} )
209
201
libomp_append(libomp_expected_library_deps libc.so.6)
210
202
libomp_append(libomp_expected_library_deps libffi.so.6)
@@ -232,13 +224,14 @@ else()
232
224
libomp_append(libomp_expected_library_deps libstdc++.so.6 LIBOMP_USE_STDCPPLIB)
233
225
libomp_append(libomp_expected_library_deps libm.so.6 LIBOMP_STATS)
234
226
endif()
235
- # Perl script expects comma separated list
227
+ # Check depends script expects comma separated list
236
228
string(REPLACE " ; " " , " libomp_expected_library_deps " ${libomp_expected_library_deps} ")
237
229
add_custom_command(
238
230
OUTPUT test-deps/.success
239
231
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR} /test-deps
240
- COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR} /check-depends.pl --os=${LIBOMP_PERL_SCRIPT_OS}
241
- --arch=${LIBOMP_PERL_SCRIPT_ARCH} --expected=" ${libomp_expected_library_deps} " ${LIBOMP_OUTPUT_DIRECTORY} /${LIBOMP_LIB_FILE}
232
+ COMMAND ${Python3_EXECUTABLE} ${LIBOMP_TOOLS_DIR} /check-depends.py
233
+ --expected=" ${libomp_expected_library_deps} "
234
+ ${LIBOMP_OUTPUT_DIRECTORY} /${LIBOMP_LIB_FILE}
242
235
COMMAND ${CMAKE_COMMAND} -E touch test-deps/.success
243
- DEPENDS omp ${LIBOMP_TOOLS_DIR} /check-depends.pl
236
+ DEPENDS omp ${LIBOMP_TOOLS_DIR} /check-depends.py
244
237
)
0 commit comments