1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

increased warnings to catch overloaded-virtuals - integrated clang and clang-tools to provide alternate collections of warnings

This commit is contained in:
Stephen Gaito 2019-06-28 16:56:45 +01:00
parent b9c9950191
commit d091550e59
4 changed files with 11 additions and 6 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
build
compile_commands.json
CMakeCache.txt
CMakeFiles/*

View File

@ -1,9 +1,9 @@
# leave this above project(pdf2htmlEX)
# set default build type to Release
set(CMAKE_EXPORT_COMPILE_COMMANDS, ON)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build configuration (Debug, Release, RelWithDebInfo, MinSizeRel)")
project(pdf2htmlEX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
option(ENABLE_SVG "Enable SVG support, for generating SVG background images and converting Type 3 fonts" ON)
@ -71,12 +71,12 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
# generic flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Woverloaded-virtual")
# clang compiler need c++11 flag
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
#if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
#endif()
# CYGWIN or GCC 4.5.x bug
if(CYGWIN)

View File

@ -1,4 +1,4 @@
mkdir build
cd build
cmake ..
make install
make

4
dobuildClang Executable file
View File

@ -0,0 +1,4 @@
mkdir build
cd build
CC=clang CXX=clang++ cmake ..
make