Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ if(${IS_TOPLEVEL_PROJECT})
endif()
endif()

# TODO: add install target
# TODO: add install target
29 changes: 29 additions & 0 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.5)

project(kf)

add_library(${PROJECT_NAME} INTERFACE)
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

target_include_directories(${PROJECT_NAME}
INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/kf>
)

set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)

# Add a pseudo-project to make kf headers visible in IDE
file(GLOB_RECURSE ${PROJECT_NAME}_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/kf/*)

# Organize files into filters matching their relative paths
foreach(header ${${PROJECT_NAME}_HEADERS})
file(RELATIVE_PATH rel_path "${CMAKE_CURRENT_SOURCE_DIR}" "${header}")
get_filename_component(rel_dir "${rel_path}" DIRECTORY)
if(rel_dir)
string(REPLACE "/" "\\" filter "${rel_dir}")
source_group("${filter}" FILES "${header}")
endif()
endforeach()

add_custom_target(${PROJECT_NAME}-headers SOURCES ${${PROJECT_NAME}_HEADERS})
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#include "DoubleLinkedListEntry.h"

namespace kf
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#include "DoubleLinkedListEntry.h"

namespace kf
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

namespace kf
{
// TODO: move to DoubleLinkedList

class DoubleLinkedListDestroyer
{
public:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#include "DoubleLinkedListEntry.h"

namespace kf
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "GenericTableAvl.h"
#include <functional>
#include <utility>
#include "GenericTableAvl.h"
#include "DoubleLinkedList.h"

namespace kf
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion include/kf/Base64.h → include/kf/encoding/Base64.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "USimpleString.h"
#include "kf/string/USimpleString.h"
#include <span>

namespace kf
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions include/kf/Hex.h → include/kf/encoding/Hex.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "USimpleString.h"
#include "ASimpleString.h"
#include "kf/string/USimpleString.h"
#include "kf/string/ASimpleString.h"
#include <span>
#include <array>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <algorithm>
#include <intrin.h>
#include "EncodingDetector.h"
#include "SpanUtils.h"
#include "kf/containers/SpanUtils.h"

namespace kf
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#pragma once
#include "USimpleString.h"
#include <utility>
#include "kf/string/USimpleString.h"

namespace kf
{
// TODO: Implement a Path type instead of utils
///////////////////////////////////////////////////////////////////////////////////////////////////
// FilenameUtils - inspired by http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/FilenameUtils.html

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions include/kf/FltWorkItem.h → include/kf/guard/FltWorkItem.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "ScopeFailure.h"
#include "stl/memory"
#include "kf/stl/memory"
#include "kf/guard/ScopeFailure.h"

namespace kf
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions include/kf/Scanner.h → include/kf/string/Scanner.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once
#include "USimpleString.h"
#include <span>
#include "SpanUtils.h"
#include "kf/containers/SpanUtils.h"

namespace kf
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma once

#include "EResource.h"
#include "Semaphore.h"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions include/kf/Thread.h → include/kf/thread/Thread.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "ObjectAttributes.h"
#include "Guard.h"
#include "kf/guard/ObjectAttributes.h"
#include "kf/guard/Guard.h"

namespace kf
{
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "ObjectAttributes.h"
#include "ScopeExit.h"
#include "VariableSizeStruct.h"
#include "kf/guard/ObjectAttributes.h"
#include "kf/guard/ScopeExit.h"
#include "kf/guard/VariableSizeStruct.h"

namespace kf
{
Expand Down
4 changes: 2 additions & 2 deletions test/HexTest.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "pch.h"
#include <kf/Hex.h>
#include <kf/encoding/Hex.h>

SCENARIO("TODO: implement")
{
REQUIRE(true);
}
}