mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
don't do -ipo check for non-intel compilers (causes issues with Clang on OSX)
This commit is contained in:
@@ -64,9 +64,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
|
||||
endif()
|
||||
|
||||
# Intel equivalent to LTO is called IPO
|
||||
CHECK_CXX_COMPILER_FLAG("-ipo" HAS_IPO_FLAG)
|
||||
if (HAS_IPO_FLAG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ipo")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
CHECK_CXX_COMPILER_FLAG("-ipo" HAS_IPO_FLAG)
|
||||
if (HAS_IPO_FLAG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ipo")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user