Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
70ee47dd
Commit
70ee47dd
authored
Feb 18, 2016
by
Ben Pritchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Intel to cmake file. Supress Intel inline/noinline warning
parent
0b6cff3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
+10
-1
CMakeLists.txt
+8
-1
include/pybind11/pybind11.h
+2
-0
No files found.
CMakeLists.txt
View file @
70ee47dd
...
...
@@ -38,7 +38,7 @@ endif()
string
(
REPLACE
"+"
""
PYTHONLIBS_VERSION_STRING
"+
${
PYTHONLIBS_VERSION_STRING
}
"
)
find_package
(
PythonInterp
${
PYTHONLIBS_VERSION_STRING
}
EXACT REQUIRED
)
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
OR CMAKE_CXX_COMPILER_ID MATCHES
"GNU"
)
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
OR CMAKE_CXX_COMPILER_ID MATCHES
"GNU"
OR CMAKE_CXX_COMPILER_ID MATCHES
"Intel"
)
CHECK_CXX_COMPILER_FLAG
(
"-std=c++14"
HAS_CPP14_FLAG
)
CHECK_CXX_COMPILER_FLAG
(
"-std=c++11"
HAS_CPP11_FLAG
)
...
...
@@ -57,10 +57,17 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fvisibility=hidden"
)
# Check for Link Time Optimization support
# (GCC/Clang)
CHECK_CXX_COMPILER_FLAG
(
"-flto"
HAS_LTO_FLAG
)
if
(
HAS_LTO_FLAG
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-flto"
)
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"
)
endif
()
endif
()
endif
()
...
...
include/pybind11/pybind11.h
View file @
70ee47dd
...
...
@@ -17,6 +17,8 @@
# pragma warning(disable: 4996) // warning C4996: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name
# pragma warning(disable: 4100) // warning C4100: Unreferenced formal parameter
# pragma warning(disable: 4512) // warning C4512: Assignment operator was implicitly defined as deleted
#elif defined(__ICC) || defined(__INTEL_COMPILER)
# pragma warning(disable:2196) // warning #2196: routine is both "inline" and "noinline"
#elif defined(__GNUG__) and !defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment