check_mod_soname.cmake 283 Bytes
Newer Older
1
execute_process(COMMAND ${readelf} -d ${mod} OUTPUT_FILE ${mod}.readelf.txt)
2
file(STRINGS ${mod}.readelf.txt soname REGEX "SONAME")
3 4
if(soname)
  message(FATAL_ERROR "${mod} has soname but should not:\n  ${soname}")
Brad King's avatar
Brad King committed
5
else()
6
  message(STATUS "${mod} has no soname as expected")
Brad King's avatar
Brad King committed
7
endif()