diff options
author | Bernd Schubert <bernd.schubert@fastmail.fm> | 2009-02-19 01:50:06 +0100 |
---|---|---|
committer | Bernd Schubert <bernd.schubert@fastmail.fm> | 2009-02-19 01:50:06 +0100 |
commit | 9217287acf95406533238c66862674e8de2f6f3e (patch) | |
tree | 2ebf3e7ada746d7b250df4c14fa95db405c68167 /CMakeLists.txt | |
parent | 957c2328a42c35cb8b1714f12e81eb9137d9b92f (diff) | |
download | unionfs-fuse-git-9217287acf95406533238c66862674e8de2f6f3e.tar.gz |
Put cmake configuration into top CMakeLists.txt
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea21378..4991462 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,5 +2,24 @@ project(unionfs-fuse) cmake_minimum_required(VERSION 2.0) +# Set a default build type for single-configuration +# CMake generators if no build type is set. +IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE RelWithDebInfo) +ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + +# Select flags. +SET(CMAKE_C_FLAGS "-pipe -W -Wall -DFORTIFY_SOURCE=2") +SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g") +SET(CMAKE_C_FLAGS_RELEASE "-O2") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG") + +add_definitions(-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26) + +option(WITH_XATTR "Enable support for extended attributes") +if(WITH_XATTR) + add_definitions(-DHAVE_SETXATTR) +endif(WITH_XATTR) + add_subdirectory(src) add_subdirectory(man) |