mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 07:02:11 +00:00
don't do -ipo check for non-intel compilers (causes issues with Clang on OSX)
This commit is contained in:
parent
3fe59b9b22
commit
e2bb4eb87a
@ -64,12 +64,14 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Intel equivalent to LTO is called IPO
|
# Intel equivalent to LTO is called IPO
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||||
CHECK_CXX_COMPILER_FLAG("-ipo" HAS_IPO_FLAG)
|
CHECK_CXX_COMPILER_FLAG("-ipo" HAS_IPO_FLAG)
|
||||||
if (HAS_IPO_FLAG)
|
if (HAS_IPO_FLAG)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ipo")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ipo")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Compile with compiler warnings turned on
|
# Compile with compiler warnings turned on
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
Loading…
Reference in New Issue
Block a user