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
868d94fc
Commit
868d94fc
authored
Jun 11, 2019
by
Lori A. Burns
Committed by
Wenzel Jakob
Jun 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply c++ standard flag only to files of CXX language. (#1678)
parent
77ef03d5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
tools/pybind11Config.cmake.in
+4
-0
tools/pybind11Tools.cmake
+4
-0
No files found.
tools/pybind11Config.cmake.in
View file @
868d94fc
...
@@ -90,7 +90,11 @@ if(NOT TARGET ${PN}::pybind11)
...
@@ -90,7 +90,11 @@ if(NOT TARGET ${PN}::pybind11)
set_property(TARGET ${PN}::module APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIBRARIES})
set_property(TARGET ${PN}::module APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIBRARIES})
endif()
endif()
if(CMAKE_VERSION VERSION_LESS 3.3)
set_property(TARGET ${PN}::pybind11 APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "${PYBIND11_CPP_STANDARD}")
set_property(TARGET ${PN}::pybind11 APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "${PYBIND11_CPP_STANDARD}")
else()
set_property(TARGET ${PN}::pybind11 APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:${PYBIND11_CPP_STANDARD}>)
endif()
get_property(_iid TARGET ${PN}::pybind11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(_iid TARGET ${PN}::pybind11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(_ill TARGET ${PN}::module PROPERTY INTERFACE_LINK_LIBRARIES)
get_property(_ill TARGET ${PN}::module PROPERTY INTERFACE_LINK_LIBRARIES)
...
...
tools/pybind11Tools.cmake
View file @
868d94fc
...
@@ -185,7 +185,11 @@ function(pybind11_add_module target_name)
...
@@ -185,7 +185,11 @@ function(pybind11_add_module target_name)
endif
()
endif
()
# Make sure C++11/14 are enabled
# Make sure C++11/14 are enabled
if
(
CMAKE_VERSION VERSION_LESS 3.3
)
target_compile_options
(
${
target_name
}
PUBLIC
${
PYBIND11_CPP_STANDARD
}
)
target_compile_options
(
${
target_name
}
PUBLIC
${
PYBIND11_CPP_STANDARD
}
)
else
()
target_compile_options
(
${
target_name
}
PUBLIC $<$<COMPILE_LANGUAGE:CXX>:
${
PYBIND11_CPP_STANDARD
}
>
)
endif
()
if
(
ARG_NO_EXTRAS
)
if
(
ARG_NO_EXTRAS
)
return
()
return
()
...
...
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