You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
406 B

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()
if(${OUTPUT} MATCHES "(Foo[^\\n]*bar|hidden_function)")
message(FATAL_ERROR
"Found ${CMAKE_MATCH_1} which should have been hidden [${OUTPUT}]")
endif()