check_mod_soname.cmake 289 Bytes
Newer Older
1 2 3 4
execute_process(COMMAND ${readelf} -d ${mod} OUTPUT_FILE ${mod}.readelf.txt)
file(STRINGS ${mod}.readelf.txt soname REGEX "\\(SONAME\\)")
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()