summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBernd Schubert <bs@q-leap.de>2008-05-28 17:57:12 +0200
committerBernd Schubert <bs@q-leap.de>2008-05-28 17:57:12 +0200
commit47cb76a5491755a98ea3d5e10c9422285ff82fa6 (patch)
treecdee761e54c8a2040ab518f2892c5b229eb2cf81 /CMakeLists.txt
parent1ff91bf56011e2d8e40fb32c800488bce69b1274 (diff)
downloadunionfs-fuse-47cb76a5491755a98ea3d5e10c9422285ff82fa6.tar.gz
Fix cmake builds and set default build options.v0.19
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a90f08..2a823a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,17 @@
project(unionfs-fuse)
+# 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 "-Wall")
+SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-O2")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+
add_definitions(-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26)
option(WITH_XATTR "Enable support for extended attributes")
@@ -8,7 +20,7 @@ if(WITH_XATTR)
endif(WITH_XATTR)
set(HASHTABLE_SRCS hashtable.c hashtable_itr.c hash.c elfhash.c)
-set(UNIONFS_SRCS unionfs.c stats.c opts.c debug.c findbranch.c readdir.c general.c unlink.c cow.c cow_utils.c)
+set(UNIONFS_SRCS unionfs.c stats.c opts.c debug.c findbranch.c readdir.c general.c unlink.c cow.c cow_utils.c string.c rmdir.c)
add_executable(unionfs ${UNIONFS_SRCS} ${HASHTABLE_SRCS})
target_link_libraries(unionfs fuse pthread m rt)