Skip to content

Commit 7ad439f

Browse files
committed
adds link option for Apple clang
1 parent 285c86e commit 7ad439f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ if(CMAKE_PROJECT_NAME STREQUAL "scc")
2727

2828
include(GNUInstallDirs)
2929

30+
if (APPLE)
31+
# From systemc CMakeLists.txt: "It's OK that _sc_main, __sanitizer_start_switch_fiber, and
32+
# __sanitizer_finish_switch_fiber are undefined symbols."
33+
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-U,_sc_main,-U,___sanitizer_start_switch_fiber,-U,___sanitizer_finish_switch_fiber" CACHE INTERNAL "" FORCE)
34+
endif(APPLE)
3035
set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install.
3136
option(ENABLE_CLANG_TIDY "Add clang-tidy automatically to builds" OFF)
3237
option(BUILD_SCC_LIB_ONLY "Build only the library (no examples" OFF)

0 commit comments

Comments
 (0)