summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Import/A/check_lib_soname.cmake
blob: a3c4b54bee7b451d3ca92a179d5ef8257beab642 (plain)
1
2
3
4
5
6
7
execute_process(COMMAND ${readelf} -d ${lib} OUTPUT_FILE ${lib}.readelf.txt)
file(STRINGS ${lib}.readelf.txt soname REGEX "SONAME")
if(soname)
  message(STATUS "${lib} has soname as expected:\n  ${soname}")
else()
  message(FATAL_ERROR "${lib} has no soname but should:\n  ${soname}")
endif()