mirror of
https://github.com/reactos/CMake.git
synced 2024-12-03 00:57:25 +00:00
fdb3f878fe
Teach the Plugin test to check that the NO_SONAME target property works as documented. Check that the IMPORTED targets are written with the correct properties. When readelf is available use it to check the actual binary files for SONAME fields.
15 lines
602 B
CMake
15 lines
602 B
CMake
execute_process(COMMAND ${readelf} -d ${mod1} OUTPUT_FILE ${mod1}.readelf.txt)
|
|
execute_process(COMMAND ${readelf} -d ${mod2} OUTPUT_FILE ${mod2}.readelf.txt)
|
|
file(STRINGS ${mod1}.readelf.txt soname1 REGEX "\\(SONAME\\)")
|
|
file(STRINGS ${mod2}.readelf.txt soname2 REGEX "\\(SONAME\\)")
|
|
if(soname1)
|
|
message(STATUS "${mod1} has soname as expected: ${soname1}")
|
|
else()
|
|
message(FATAL_ERROR "${mod1} has no soname but should:\n ${soname1}")
|
|
endif()
|
|
if(soname2)
|
|
message(FATAL_ERROR "${mod2} has soname but should not:\n ${soname2}")
|
|
else()
|
|
message(STATUS "${mod2} has no soname as expected")
|
|
endif()
|