2014-01-31 19:09:06 +04:00
|
|
|
execute_process(COMMAND ${CMAKE_NM} -D ${TEST_LIBRARY_PATH}
|
|
|
|
RESULT_VARIABLE RESULT
|
|
|
|
OUTPUT_VARIABLE OUTPUT
|
|
|
|
ERROR_VARIABLE ERROR
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT "${RESULT}" STREQUAL "0")
|
|
|
|
message(FATAL_ERROR "nm failed [${RESULT}] [${OUTPUT}] [${ERROR}]")
|
|
|
|
endif()
|
|
|
|
|
2015-05-22 21:01:44 +03:00
|
|
|
if(${OUTPUT} MATCHES "(Foo[^\\n]*bar|hidden_function)")
|
2014-01-31 19:09:06 +04:00
|
|
|
message(FATAL_ERROR
|
2015-05-22 21:01:44 +03:00
|
|
|
"Found ${CMAKE_MATCH_1} which should have been hidden [${OUTPUT}]")
|
2014-01-31 19:09:06 +04:00
|
|
|
endif()
|