Commit 82e54cdc authored by Marc Vef's avatar Marc Vef
Browse files

adafs_low started

parent 1d55ec41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
project(fs VERSION 0.0.1 LANGUAGES C)
project(bbfs VERSION 0.0.1 LANGUAGES C)

#set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")

lfs/.gitignore

0 → 100644
+17 −0
Original line number Diff line number Diff line


# IDEA FILES #
#####################
.idea/

# BUILD #
#########

build/

# DEBUG #
#########

cmake-build-debug/
cmake-build-release/
playground/
+34 −0
Original line number Diff line number Diff line
# Find the FUSE includes and library
#
#  FUSE_INCLUDE_DIR - where to find fuse.h, etc.
#  FUSE_LIBRARIES   - List of libraries when using FUSE.
#  FUSE_FOUND       - True if FUSE lib is found.

# check if already in cache, be silent
IF (FUSE_INCLUDE_DIR)
    SET (FUSE_FIND_QUIETLY TRUE)
ENDIF (FUSE_INCLUDE_DIR)

# find includes
FIND_PATH (FUSE_INCLUDE_DIR fuse.h
        /usr/local/include/osxfuse
        /usr/local/include
        /usr/include
        )

# find lib
if (APPLE)
    SET(FUSE_NAMES libosxfuse.dylib fuse)
else (APPLE)
    SET(FUSE_NAMES fuse)
endif (APPLE)
FIND_LIBRARY(FUSE_LIBRARIES
        NAMES ${FUSE_NAMES}
        PATHS /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/lib/x86_64-linux-gnu
        )

include ("FindPackageHandleStandardArgs")
find_package_handle_standard_args ("FUSE" DEFAULT_MSG
        FUSE_INCLUDE_DIR FUSE_LIBRARIES)

mark_as_advanced (FUSE_INCLUDE_DIR FUSE_LIBRARIES)
 No newline at end of file
+34 −0
Original line number Diff line number Diff line
# Try to find fuse (devel)
# Once done, this will define
#
# FUSE3_FOUND - system has fuse
# FUSE3_INCLUDE_DIRS - the fuse include directories
# FUSE3_LIBRARIES - fuse libraries directories

if(FUSE3_INCLUDE_DIRS AND FUSE3_LIBRARIES)
    set(FUSE3_FIND_QUIETLY TRUE)
endif(FUSE3_INCLUDE_DIRS AND FUSE3_LIBRARIES)

find_path( FUSE3_INCLUDE_DIR fuse3/fuse_lowlevel.h
        HINTS
        /usr
        /usr/local
        ${FUSE3_DIR}
        PATH_SUFFIXES include )

find_library( FUSE3_LIBRARY fuse3
        HINTS
        /usr
        /usr/local
        ${FUSE3_DIR}
        PATH_SUFFIXES lib )

set(FUSE3_INCLUDE_DIRS ${FUSE3_INCLUDE_DIR})
set(FUSE3_LIBRARIES ${FUSE3_LIBRARY})

# handle the QUIETLY and REQUIRED arguments and set FUSE3_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(fuse3 DEFAULT_MSG FUSE3_INCLUDE_DIR FUSE3_LIBRARY)

mark_as_advanced(FUSE3_INCLUDE_DIR FUSE3_LIBRARY)
 No newline at end of file

lfs/CMakeLists.txt

0 → 100644
+24 −0
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
project(lfs VERSION 0.0.1)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall --pedantic -g -pg")

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)


# required packages
find_package(FUSE3 REQUIRED)
# boost dependencies, system is required for filesystem #TODO VERSION UNTESTED. I USE 1.62
find_package(Boost 1.56.0 COMPONENTS system filesystem serialization)

include_directories(${FUSE3_INCLUDE_DIR} include/)
set(SOURCE_FILES src/main.cpp src/main.h src/fuse_ops.h src/util.cpp src/classes/metadata.h src/classes/metadata.cpp src/adafs_ops/metadata_ops.h src/adafs_ops/metadata_ops.cpp src/adafs_ops/dentry_ops.cpp src/adafs_ops/dentry_ops.h src/configure.h src/fuse_ops/file.cpp src/fuse_ops/directory.cpp src/fuse_ops/access.cpp src/fuse_ops/sync.cpp src/adafs_ops/access.cpp src/adafs_ops/access.h src/fuse_ops/fs.cpp src/fuse_ops/io.cpp src/adafs_ops/io.cpp src/adafs_ops/io.h)
add_executable(adafs ${SOURCE_FILES} src/main.cpp)
target_link_libraries(adafs ${FUSE3_LIBRARIES} -lpthread -lboost_system -lboost_filesystem -lboost_serialization -pg)
 No newline at end of file
Loading