@@ -309,8 +309,8 @@ endif()
309309if (SOUFFLE_USE_SQLITE)
310310 target_compile_definitions (libsouffle PUBLIC USE_SQLITE )
311311 target_compile_definitions (compiled PUBLIC USE_SQLITE )
312- target_link_libraries (libsouffle PUBLIC SQLite ::SQLite3 )
313- target_link_libraries (compiled PUBLIC SQLite ::SQLite3 )
312+ target_link_libraries (libsouffle PUBLIC SQLite3 ::SQLite3 )
313+ target_link_libraries (compiled PUBLIC SQLite3 ::SQLite3 )
314314 target_include_directories (compiled PUBLIC ${SQLite3_INCLUDE_DIRS} )
315315endif ()
316316
@@ -440,12 +440,14 @@ endif (MSVC)
440440
441441if (APPLE )
442442 if ("${CMAKE_HOST_SYSTEM_PROCESSOR } " STREQUAL "arm64" )
443- # work around a known issue with xcode15 linker
444- # c++ exceptions handling is broken otherwise
445- set (CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-ld_classic" )
446- target_link_options (libsouffle PUBLIC "-ld_classic" )
447- target_link_options (compiled PUBLIC "-ld_classic" )
448- target_link_options (souffleprof PUBLIC "-ld_classic" )
443+ if (XCODE_VERSION VERSION_LESS "26" AND NOT XCODE_VERSION VERSION_LESS "15" )
444+ # work around a known issue with xcode15 linker
445+ # c++ exceptions handling is broken otherwise
446+ set (CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-ld_classic" )
447+ target_link_options (libsouffle PUBLIC "-ld_classic" )
448+ target_link_options (compiled PUBLIC "-ld_classic" )
449+ target_link_options (souffleprof PUBLIC "-ld_classic" )
450+ endif ()
449451 endif ()
450452endif ()
451453
@@ -474,6 +476,9 @@ endif()
474476
475477if (OPENMP_FOUND)
476478 string (APPEND SOUFFLE_COMPILED_CXX_FLAGS " ${OpenMP_CXX_FLAGS} " )
479+ if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
480+ string (APPEND SOUFFLE_COMPILED_CXX_FLAGS " ${OpenMP_CXX_LIBRARIES} " )
481+ endif ()
477482 list (APPEND SOUFFLE_COMPILED_INCS ${OpenMP_CXX_INCLUDE_DIRS} )
478483endif ()
479484
@@ -560,6 +565,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
560565 set (SOUFFLE_COMPILED_LINK_OPTIONS "/link ${SOUFFLE_COMPILED_LINK_OPTIONS} " )
561566endif ()
562567
568+ list (REMOVE_DUPLICATES SOUFFLE_COMPILED_RPATHS)
563569list (JOIN SOUFFLE_COMPILED_RPATHS "${OS_PATH_DELIMITER} " SOUFFLE_COMPILED_RPATH_LIST)
564570
565571list (TRANSFORM SOUFFLE_COMPILED_INCS PREPEND "-I" )
0 commit comments