diff --git a/.gitignore b/.gitignore index 19fb396..a56d2ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +build compile_commands.json CMakeCache.txt CMakeFiles/* diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ebba7a..8a1cec4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/dobuild b/dobuild index 5b55a1c..97e5ac1 100755 --- a/dobuild +++ b/dobuild @@ -1,4 +1,4 @@ mkdir build cd build cmake .. -make install +make diff --git a/dobuildClang b/dobuildClang new file mode 100755 index 0000000..4a9914a --- /dev/null +++ b/dobuildClang @@ -0,0 +1,4 @@ +mkdir build +cd build +CC=clang CXX=clang++ cmake .. +make