Skip to content

Commit

Permalink
Merge pull request #273 from krasznaa/MacOSLinkerUpdate-main-20240324
Browse files Browse the repository at this point in the history
Xcode Link Option Update, main branch (2024.03.24.)
  • Loading branch information
krasznaa authored Apr 11, 2024
2 parents 5f2d20e + 00e77d8 commit e7d51ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/vecmem-compiler-options-cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ endif()

# Do not allow symbols to be missing from shared libraries.
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" )
vecmem_add_flag( CMAKE_SHARED_LINKER_FLAGS "-Wl,-undefined,error" )
# From AppleClang 15 onwards, the default is to fail on undefined symbols.
if( "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "15" )
vecmem_add_flag( CMAKE_SHARED_LINKER_FLAGS "-Wl,-undefined,error" )
endif()
elseif( ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" ) OR
( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) )
vecmem_add_flag( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
Expand Down

0 comments on commit e7d51ed

Please sign in to comment.