CELIX-347: Updated BuildOptions to allow undefs in shared libaries. This is needed when using the asan
Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/c1078421 Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/c1078421 Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/c1078421 Branch: refs/heads/release/celix-2.0.0 Commit: c1078421b70a25db60a9f99d3157198f5aadbe9c Parents: e0ab154 Author: Pepijn Noltes <[email protected]> Authored: Tue Feb 16 16:51:03 2016 +0100 Committer: Pepijn Noltes <[email protected]> Committed: Tue Feb 16 16:51:03 2016 +0100 ---------------------------------------------------------------------- cmake/cmake_celix/BuildOptions.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/c1078421/cmake/cmake_celix/BuildOptions.cmake ---------------------------------------------------------------------- diff --git a/cmake/cmake_celix/BuildOptions.cmake b/cmake/cmake_celix/BuildOptions.cmake index 8c5caf5..11deb68 100644 --- a/cmake/cmake_celix/BuildOptions.cmake +++ b/cmake/cmake_celix/BuildOptions.cmake @@ -2,6 +2,6 @@ option(ENABLE_ADDRESS_SANITIZER "Enabled building with address sanitizer. Note for gcc libasan must be installed" OFF) if (ENABLE_ADDRESS_SANITIZER) - set(CMAKE_C_FLAGS "-lasan -fsanitize=address ${CMAKE_C_FLAGS}") - set(CMAKE_CXX_FLAGS "-lasan -fsanitize=address ${CMAKE_CXX_FLAGS}") + set(CMAKE_C_FLAGS "-lasan -fsanitize=address ${CMAKE_C_FLAGS} -Wl,--allow-shlib-undefined") + set(CMAKE_CXX_FLAGS "-lasan -fsanitize=address ${CMAKE_CXX_FLAGS} -Wl,--allow-shlib-undefined") endif()
