Fix compilation error on Ubuntu Xenial (#60)

* CMake: Remove -Wstrict-overflow (#59)
This warning has been added by mistake in a previous PR. Closes #59

* Travis: Do not build the examples
This commit is contained in:
Alessandro Gario 2017-12-20 00:13:03 +01:00 committed by GitHub
parent b60b908fa2
commit 752f526e2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 31 deletions

View File

@ -20,7 +20,7 @@ else ()
-Wformat=2 -Winit-self -Wlong-long -Wmissing-declarations -Wmissing-include-dirs -Wcomment
-Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion
-Wsign-promo -Wstrict-overflow=5 -Wswitch-default -Wundef -Werror -Wunused -Wuninitialized
-Wno-missing-declarations
-Wno-missing-declarations -Wno-strict-overflow
)
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")

View File

@ -152,7 +152,7 @@ common_build() {
printf " > Installing...\n"
sudo touch /usr/lib/test_file > /dev/null 2>&1
if [ $? -ne 0 ] ; then
printf " x Access denied to /usr/lib; examples will not be built\n"
printf " x Access denied to /usr/lib; the 'install' step will be skipped\n"
else
( cd "build" && sudo make install ) > "$log_file" 2>&1
@ -161,35 +161,6 @@ common_build() {
cat "$log_file"
return 1
fi
printf "\n"
printf "Examples\n"
if [ ! -d "examples_build" ] ; then
printf " > Creating the build directory...\n"
mkdir "examples_build"
if [ $? -ne 0 ] ; then
printf " x Failed to create the build directory\n\n\n"
cat "$log_file"
return 1
fi
fi
printf " > Configuring...\n"
( cd "examples_build" && cmake "../examples/peaddrconv" ) > "$log_file" 2>&1
if [ $? -ne 0 ] ; then
printf " x Configure failed; CMake returned an error.\n\n\n"
cat "$log_file"
return 1
fi
printf " > Building...\n"
( cd "examples_build" && make -j "${processor_count}" ) > "$log_file" 2>&1
if [ $? -ne 0 ] ; then
printf " x The build has failed.\n\n\n"
cat "$log_file"
return 1
fi
fi
printf "\n"