Update cmake for dynamic allocation tracking

If cmake variable ENABLE_DYNAMIC_MEMORY_TRACKING is true:
- add preprocessor definition to enable tacking
- change linker options to export all symbols

Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2022-04-04 11:38:00 +00:00
committed by Compute-Runtime-Automation
parent 817ba40771
commit ff240c66db
3 changed files with 18 additions and 8 deletions

View File

@@ -175,9 +175,11 @@ if(${GENERATE_EXECUTABLE})
target_include_directories(${NEO_DYNAMIC_LIB_NAME} PRIVATE
${NEO_SHARED_DIRECTORY}/dll/devices${BRANCH_DIR_SUFFIX}
)
set_property(TARGET ${NEO_DYNAMIC_LIB_NAME}
APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--version-script=${EXPORTS_FILENAME}"
)
if(NOT ENABLE_DYNAMIC_MEMORY_TRACKING)
set_property(TARGET ${NEO_DYNAMIC_LIB_NAME}
APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--version-script=${EXPORTS_FILENAME}"
)
endif()
set_property(TARGET ${NEO_DYNAMIC_LIB_NAME}
APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-Bsymbolic"
)