Commit 245dd5ac authored by Paul Schütze's avatar Paul Schütze
Browse files

Merge branch 'p-appleclang-clang-v2' into 'master'

[GitHub] Catching stealth AppleClang to determine cmake flags. Avoid including both...

See merge request allpix-squared/allpix-squared!1109
parents 047a1860 4cf4a915
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ The following authors, in alphabetical order, have developed or contributed to A
* Katharina Dort, University of Gießen, [kdort](https://gitlab.cern.ch/kdort)
* Neal Gauvin, Université de Genève, [ngauvin](https://gitlab.cern.ch/ngauvin)
* Yajun He, DESY, [yajun](https://gitlab.cern.ch/yajun)
* Ryan Heller, LBNL, [heller3](https://github.com/heller3)
* Lennart Huth, DESY, [lhuth](https://gitlab.cern.ch/lhuth)
* Daniel Hynds, University of Oxford, [dhynds](https://gitlab.cern.ch/dhynds)
* Francisco-Jose Iguaz-Gutierrez, Synchrotron SOLEIL, [iguaz-gutierrez](https://github.com/iguaz-gutierrez)
+3 −4
Original line number Diff line number Diff line
@@ -25,11 +25,10 @@ ELSEIF(CMAKE_THREAD_LIBS_INIT)
ENDIF()

# Set no undefined symbols flag for the linker if supported
IF((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
ENDIF()
IF(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
IF((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
ELSEIF((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
ENDIF()

# Reduce Wstrict-overflow level for some GCC versions due to false positives: