Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compilation warnings with clang #415

Merged
merged 6 commits into from
Oct 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ else ()
endif()
endif ()

# Let's enable some compilation warnings
list(APPEND CMAKE_CXX_FLAGS "-Wall -Wextra")

add_definitions( -DPACKAGE="encfs" )

# http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH
Expand All @@ -69,12 +72,12 @@ endif()

# Check for FUSE.
find_package (FUSE REQUIRED)
include_directories (${FUSE_INCLUDE_DIR})
include_directories (SYSTEM ${FUSE_INCLUDE_DIR})
add_definitions (-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26)

# Check for OpenSSL.
find_package (OpenSSL REQUIRED)
include_directories (${OPENSSL_INCLUDE_DIR})
include_directories (SYSTEM ${OPENSSL_INCLUDE_DIR})

find_program (POD2MAN pod2man)

Expand Down Expand Up @@ -153,7 +156,7 @@ include_directories (${CMAKE_CURRENT_LIST_DIR})
if (ENABLE_NLS)
find_package (Intl)
if (Intl_FOUND)
include_directories (${Intl_INCLUDE_DIRS})
include_directories (SYSTEM ${Intl_INCLUDE_DIRS})
endif()

add_subdirectory(po)
Expand Down Expand Up @@ -196,19 +199,19 @@ if (USE_INTERNAL_TINYXML)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "build shared libs")
set(BUILD_TESTS OFF CACHE BOOL "build tests")
add_subdirectory(${TINYXML_DIR} EXCLUDE_FROM_ALL)
include_directories(${CMAKE_CURRENT_LIST_DIR}/${TINYXML_DIR})
include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/${TINYXML_DIR})
link_directories(${CMAKE_BINARY_DIR}/${TINYXML_DIR})
set(TINYXML_LIBRARIES tinyxml2_static)
else ()
find_package (TinyXML REQUIRED)
include_directories (${TINYXML_INCLUDE_DIR})
include_directories (SYSTEM ${TINYXML_INCLUDE_DIR})
endif ()

message("-- Using vendored easylogging++")
set(EASYLOGGING_DIR vendor/github.com/muflihun/easyloggingpp)
set(build_static_lib ON CACHE BOOL "build static libs")
add_subdirectory(${EASYLOGGING_DIR} EXCLUDE_FROM_ALL)
include_directories(${CMAKE_CURRENT_LIST_DIR}/${EASYLOGGING_DIR}/src)
include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/${EASYLOGGING_DIR}/src)
link_directories(${CMAKE_BINARY_DIR}/${EASYLOGGING_DIR})
set(EASYLOGGING_LIBRARIES easyloggingpp)

Expand Down