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:
parent
aff123698b
commit
c2c9890c68
@ -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}")
|
||||
|
@ -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")
|
||||
|
@ -3,3 +3,4 @@ CSF_advapi32
|
||||
CSF_gdi32
|
||||
CSF_user32
|
||||
CSF_TBB
|
||||
CSF_dl
|
Loading…
x
Reference in New Issue
Block a user