mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
Merge pull request #29 from hasufell/master
use build types to handle various compiler flags
This commit is contained in:
commit
91ae1899d9
@ -1,4 +1,8 @@
|
||||
project(pdftohtmlEX)
|
||||
# leave this above project(pdf2htmlEX)
|
||||
# set default build type to Release
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build configuration (Debug, Release, RelWithDebInfo, MinSizeRel)")
|
||||
|
||||
project(pdf2htmlEX)
|
||||
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src/include)
|
||||
@ -87,18 +91,22 @@ else()
|
||||
message("Cannot locate config.h for fontforge")
|
||||
endif()
|
||||
|
||||
# debug build flags (overwrite default cmake debug flags)
|
||||
set(CMAKE_C_FLAGS_DEBUG "-ggdb")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb")
|
||||
|
||||
# release build flags (overwrite default cmake release flags)
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||
|
||||
# generic flags
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
|
||||
# clang compiler need c++11 flag
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
|
||||
|
||||
# CYGWIN or GCC 4.5.x bug
|
||||
if(CYGWIN)
|
||||
|
Loading…
Reference in New Issue
Block a user