1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0027152: Undefined symbols in library TKernel.so using clang compiler

Added ldl dependency for TKernel only (other toolkits were checked, no undefined symbols)
Added  option "-z defs" for linking on Linux
Added lm dependency for all toolkits
This commit is contained in:
apn 2016-02-17 15:59:12 +03:00 committed by abv
parent aff123698b
commit c2c9890c68
3 changed files with 13 additions and 0 deletions

View File

@ -77,6 +77,7 @@ else()
set (CSF_ThreadLibs "pthread rt stdc++")
set (CSF_OpenGlLibs "GLU GL")
set (CSF_XwLibs "X11 Xext Xmu Xi")
set (CSF_dl "dl")
if (USE_TCL)
set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}")

View File

@ -92,6 +92,17 @@ if (MSVC)
endif()
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
if (BUILD_SHARED_LIBS)
if (APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
else()
set (CMAKE_SHARED_LINKER_FLAGS "-lm -z defs ${CMAKE_SHARED_LINKER_FLAGS}")
endif()
else()
if (NOT ANDROID)
set (CMAKE_STATIC_LINKER_FLAGS "-lm ${CMAKE_SHARED_STATIC_FLAGS}")
endif()
endif()
endif()
if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")

View File

@ -3,3 +3,4 @@ CSF_advapi32
CSF_gdi32
CSF_user32
CSF_TBB
CSF_dl