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
00a30095
Commit
00a30095
authored
Aug 15, 2016
by
Dean Moldovan
Browse files
Report warnings as errors on Travis and AppVeyor
parent
91bdcf3a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
.appveyor.yml
.appveyor.yml
+1
-1
.travis.yml
.travis.yml
+4
-1
CMakeLists.txt
CMakeLists.txt
+9
-0
No files found.
.appveyor.yml
View file @
00a30095
...
@@ -28,6 +28,6 @@ install:
...
@@ -28,6 +28,6 @@ install:
7z x 3.2.9.zip -y > $null
7z x 3.2.9.zip -y > $null
$env:CMAKE_INCLUDE_PATH = "eigen-eigen-dc6cfdf9bcec"
$env:CMAKE_INCLUDE_PATH = "eigen-eigen-dc6cfdf9bcec"
build_script
:
build_script
:
-
cmake -A "%CMAKE_ARCH%"
-
cmake -A "%CMAKE_ARCH%"
-DPYBIND11_WERROR=ON
-
set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-
set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-
cmake --build . --config Release --target check -- /v:m /logger:%MSBuildLogger%
-
cmake --build . --config Release --target check -- /v:m /logger:%MSBuildLogger%
.travis.yml
View file @
00a30095
...
@@ -86,7 +86,10 @@ install:
...
@@ -86,7 +86,10 @@ install:
export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_INCLUDE_PATH=eigen-eigen-dc6cfdf9bcec"
export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_INCLUDE_PATH=eigen-eigen-dc6cfdf9bcec"
fi
fi
script
:
script
:
-
$SCRIPT_RUN_PREFIX cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_PYTHON_VERSION=$PYTHON -DPYBIND11_CPP_STANDARD=-std=c++$CPP
-
$SCRIPT_RUN_PREFIX cmake ${CMAKE_EXTRA_ARGS}
-DPYBIND11_PYTHON_VERSION=$PYTHON
-DPYBIND11_CPP_STANDARD=-std=c++$CPP
-DPYBIND11_WERROR=ON
-
$SCRIPT_RUN_PREFIX make CTEST_OUTPUT_ON_FAILURE=TRUE check -j
2
-
$SCRIPT_RUN_PREFIX make CTEST_OUTPUT_ON_FAILURE=TRUE check -j
2
after_script
:
after_script
:
-
if [ -n "$DOCKER" ]; then docker stop "$containerid"; docker rm "$containerid"; fi
-
if [ -n "$DOCKER" ]; then docker stop "$containerid"; docker rm "$containerid"; fi
CMakeLists.txt
View file @
00a30095
...
@@ -17,6 +17,7 @@ endif()
...
@@ -17,6 +17,7 @@ endif()
option
(
PYBIND11_INSTALL
"Install pybind11 header files?"
${
PYBIND11_MASTER_PROJECT
}
)
option
(
PYBIND11_INSTALL
"Install pybind11 header files?"
${
PYBIND11_MASTER_PROJECT
}
)
option
(
PYBIND11_TEST
"Build pybind11 test suite?"
${
PYBIND11_MASTER_PROJECT
}
)
option
(
PYBIND11_TEST
"Build pybind11 test suite?"
${
PYBIND11_MASTER_PROJECT
}
)
option
(
PYBIND11_WERROR
"Report all warnings as errors"
OFF
)
# Add a CMake parameter for choosing a desired Python version
# Add a CMake parameter for choosing a desired Python version
set
(
PYBIND11_PYTHON_VERSION
""
CACHE STRING
"Python version to use for compiling the example application"
)
set
(
PYBIND11_PYTHON_VERSION
""
CACHE STRING
"Python version to use for compiling the example application"
)
...
@@ -142,6 +143,14 @@ function(pybind11_enable_warnings target_name)
...
@@ -142,6 +143,14 @@ function(pybind11_enable_warnings target_name)
else
()
else
()
target_compile_options
(
${
target_name
}
PRIVATE -Wall -Wextra -Wconversion
)
target_compile_options
(
${
target_name
}
PRIVATE -Wall -Wextra -Wconversion
)
endif
()
endif
()
if
(
PYBIND11_WERROR
)
if
(
MSVC
)
target_compile_options
(
${
target_name
}
PRIVATE /WX
)
else
()
target_compile_options
(
${
target_name
}
PRIVATE -Werror
)
endif
()
endif
()
endfunction
()
endfunction
()
if
(
PYBIND11_TEST
)
if
(
PYBIND11_TEST
)
...
...
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