Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
f2331666
Commit
f2331666
authored
Nov 28, 2015
by
Wenzel Jakob
Browse files
improved compiler detection
parent
e1b113b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
CMakeLists.txt
CMakeLists.txt
+3
-3
No files found.
CMakeLists.txt
View file @
f2331666
...
...
@@ -27,8 +27,8 @@ set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6)
find_package
(
PythonLibs
${
PYBIND11_PYTHON_VERSION
}
REQUIRED
)
find_package
(
PythonInterp
${
PYBIND11_PYTHON_VERSION
}
REQUIRED
)
if
(
UNIX
)
# Enable C++11 mode
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
OR
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
# Enable C++11 mode
on C++ / Clang
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11"
)
# Enable link time optimization and set the default symbol
...
...
@@ -45,7 +45,7 @@ if(MSVC)
else
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/W4"
)
endif
()
else
(
)
else
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
OR
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -Wextra"
)
endif
()
...
...
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