Skip to content

Commit

Permalink
Finish move to CMake.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuart6854 committed Nov 24, 2023
1 parent 06508ac commit 3456ddf
Show file tree
Hide file tree
Showing 15 changed files with 406 additions and 472 deletions.
54 changes: 54 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Language: Cpp
BasedOnStyle: LLVM

AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignEscapedNewlines: Left
AlignOperands: DontAlign
AlignTrailingComments: true
AlignArrayOfStructures: Right
AllowShortBlocksOnASingleLine: Empty
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: true
IndentBraces: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakInheritanceList: AfterColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakStringLiterals: false
ColumnLimit: 160
Cpp11BracedListStyle: false
EmptyLineBeforeAccessModifier: LogicalBlock
IndentCaseBlocks: false
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 4
NamespaceIndentation: All
PointerAlignment: Left
SortIncludes: Never
SpaceBeforeCaseColon: false
TabWidth: 4
UseTab: Always
SeparateDefinitionBlocks: Leave
AlwaysBreakTemplateDeclarations: Yes
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ set_target_properties(gfs PROPERTIES
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
target_link_directories(gfs PRIVATE lz4_static)
target_link_libraries(gfs PRIVATE lz4_static)

if(${GFS_BUILD_TESTS})
message(STATUS "Building testbed")
add_subdirectory(testbed)
endif()

if(${GFS_BUILD_BENCHMARK})
message(STATUS "Building benchmarks")
add_subdirectory(benchmarks)
message(STATUS "Building benchmark")
add_subdirectory(benchmark)
endif()
5 changes: 0 additions & 5 deletions GenerateProj_GMake2.sh

This file was deleted.

5 changes: 0 additions & 5 deletions GenerateProj_VS2022.bat

This file was deleted.

3 changes: 2 additions & 1 deletion benchmarks/CMakeLists.txt → benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
add_library(gfs_benchmark
add_executable(gfs_benchmark
benchmark.cpp
)
target_include_directories(gfs_benchmark PUBLIC include)
set_target_properties(gfs_benchmark PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
OUTPUT_NAME benchmark
)

target_link_libraries(gfs_benchmark PRIVATE gfs)
File renamed without changes.
42 changes: 0 additions & 42 deletions benchmarks/build_benchmark.lua

This file was deleted.

19 changes: 0 additions & 19 deletions build.lua

This file was deleted.

33 changes: 0 additions & 33 deletions build_gfs.lua

This file was deleted.

6 changes: 6 additions & 0 deletions include/gfs/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ namespace gfs
*/
bool ReadFile(FileID fileId, BinaryStreamable& dataObject);

/////////////////////////////////////////////////////////////////////////
// Archives
//////////////////////////////////////////////////////////////////////////

bool CreateArchive(MountID mount, const std::filesystem::path& filename, const std::vector<FileID>& files);

//////////////////////////////////////////////////////////////////////////
// Import
//////////////////////////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit 3456ddf

Please sign in to comment.