Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 10830fb412 | |||
| cc499028fb | |||
| 572b8b2c78 |
@@ -1,7 +1,7 @@
|
|||||||
BC_VAR_PROJECT_NAME=nostalgia
|
BC_VAR_PROJECT_NAME=nostalgia
|
||||||
BC_VAR_PROJECT_NAME_CAP=Nostalgia
|
BC_VAR_PROJECT_NAME_CAP=Nostalgia
|
||||||
BC_VAR_DEVENV_ROOT=util
|
BC_VAR_DEVENV_ROOT=util
|
||||||
BUILDCORE_PATH=deps/buildcore
|
BUILDCORE_PATH=deps/ox/deps/buildcore
|
||||||
include ${BUILDCORE_PATH}/base.mk
|
include ${BUILDCORE_PATH}/base.mk
|
||||||
|
|
||||||
ifeq ($(BC_VAR_OS),darwin)
|
ifeq ($(BC_VAR_OS),darwin)
|
||||||
@@ -13,6 +13,19 @@ else
|
|||||||
endif
|
endif
|
||||||
PROJECT_PLAYER=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}
|
PROJECT_PLAYER=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}
|
||||||
|
|
||||||
|
.PHONY: git-setup-ox-remote
|
||||||
|
git-setup-ox-remote:
|
||||||
|
git remote add -f ox-master git@git.drinkingtea.net:drinkingtea/ox.git
|
||||||
|
|
||||||
|
.PHONY: git-pull-ox
|
||||||
|
git-pull-ox:
|
||||||
|
git fetch ox-master master
|
||||||
|
git subtree pull --prefix deps/ox ox-master master --squash
|
||||||
|
|
||||||
|
.PHONY: git-push-ox
|
||||||
|
git-push-ox:
|
||||||
|
git subtree push --prefix=deps/ox ox-master master
|
||||||
|
|
||||||
.PHONY: pkg-gba
|
.PHONY: pkg-gba
|
||||||
pkg-gba: build-pack build-gba-player
|
pkg-gba: build-pack build-gba-player
|
||||||
${BC_CMD_ENVRUN} ${BC_PY3} ./util/scripts/pkg-gba.py sample_project ${BC_VAR_PROJECT_NAME_CAP}
|
${BC_CMD_ENVRUN} ${BC_PY3} ./util/scripts/pkg-gba.py sample_project ${BC_VAR_PROJECT_NAME_CAP}
|
||||||
|
|||||||
Vendored
-12
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"log_functions": [
|
|
||||||
{
|
|
||||||
"function": "ox::trace::gdblogger::captureLogFunc",
|
|
||||||
"ignore_frames": 3,
|
|
||||||
"file_var": "file",
|
|
||||||
"line_var": "line",
|
|
||||||
"channel_var": "ch",
|
|
||||||
"msg_var": "msg"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
name: Build
|
||||||
|
run-name: ${{ gitea.actor }} build and test
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: olympic
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- run: make purge configure-debug
|
||||||
|
- run: make build
|
||||||
|
- run: make test
|
||||||
|
- run: make purge configure-asan
|
||||||
|
- run: make build
|
||||||
|
- run: make test
|
||||||
|
- run: make purge configure-release
|
||||||
|
- run: make build
|
||||||
|
- run: make test
|
||||||
|
- run: make install
|
||||||
@@ -3,7 +3,9 @@ build/gba
|
|||||||
build/*-asan
|
build/*-asan
|
||||||
build/*-debug
|
build/*-debug
|
||||||
build/*-release
|
build/*-release
|
||||||
|
.current_build
|
||||||
tags
|
tags
|
||||||
|
compile_commands.json
|
||||||
conanbuildinfo.cmake
|
conanbuildinfo.cmake
|
||||||
conanbuildinfo.txt
|
conanbuildinfo.txt
|
||||||
conaninfo.txt
|
conaninfo.txt
|
||||||
|
|||||||
Vendored
-11
@@ -1,11 +0,0 @@
|
|||||||
language: cpp
|
|
||||||
sudo: false
|
|
||||||
dist: trusty
|
|
||||||
compiler:
|
|
||||||
- clang
|
|
||||||
- gcc
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- cmake
|
|
||||||
script: ./scripts/cibuild
|
|
||||||
Vendored
+9
-2
@@ -3,8 +3,8 @@ set(CMAKE_POLICY_DEFAULT_CMP0110 NEW) # requires CMake 3.19
|
|||||||
|
|
||||||
project(Ox CXX)
|
project(Ox CXX)
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
include(deps/buildcore/base.cmake)
|
||||||
include(address_sanitizer)
|
|
||||||
|
|
||||||
if(NOT DEFINED OX_RUN_TESTS)
|
if(NOT DEFINED OX_RUN_TESTS)
|
||||||
set(OX_RUN_TESTS ON)
|
set(OX_RUN_TESTS ON)
|
||||||
@@ -78,6 +78,13 @@ include_directories(src)
|
|||||||
|
|
||||||
install(FILES OxConfig.cmake DESTINATION lib/cmake/ox)
|
install(FILES OxConfig.cmake DESTINATION lib/cmake/ox)
|
||||||
|
|
||||||
|
install(
|
||||||
|
DIRECTORY
|
||||||
|
include/ox
|
||||||
|
DESTINATION
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
if(OX_USE_STDLIB)
|
if(OX_USE_STDLIB)
|
||||||
set(JSONCPP_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/jsoncpp/include")
|
set(JSONCPP_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/jsoncpp/include")
|
||||||
add_subdirectory(deps/jsoncpp)
|
add_subdirectory(deps/jsoncpp)
|
||||||
|
|||||||
Vendored
+15
-65
@@ -1,68 +1,18 @@
|
|||||||
OS=$(shell uname | tr [:upper:] [:lower:])
|
BC_VAR_PROJECT_NAME=ox
|
||||||
HOST_ENV=${OS}-$(shell uname -m)
|
BC_VAR_PROJECT_NAME_CAP=Ox
|
||||||
DEVENV=devenv$(shell pwd | sed 's/\//-/g')
|
BC_VAR_DEVENV_ROOT=util
|
||||||
DEVENV_IMAGE=wombatant/devenv
|
BUILDCORE_PATH=deps/buildcore
|
||||||
ifneq ($(shell which docker 2>&1),)
|
include ${BUILDCORE_PATH}/base.mk
|
||||||
ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running)
|
|
||||||
ENV_RUN=docker exec -i -t --user $(shell id -u ${USER}) ${DEVENV}
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
all:
|
.PHONY: git-setup-buildcore-remote
|
||||||
${ENV_RUN} ./scripts/run-make build
|
git-setup-buildcore-remote:
|
||||||
preinstall:
|
git remote add -f buildcore-master git@git.drinkingtea.net:drinkingtea/buildcore.git
|
||||||
${ENV_RUN} ./scripts/run-make build preinstall
|
|
||||||
install:
|
|
||||||
${ENV_RUN} ./scripts/run-make build install
|
|
||||||
clean:
|
|
||||||
${ENV_RUN} ./scripts/run-make build clean
|
|
||||||
purge:
|
|
||||||
${ENV_RUN} rm -rf build
|
|
||||||
test:
|
|
||||||
${ENV_RUN} ./scripts/run-make build test
|
|
||||||
|
|
||||||
devenv:
|
.PHONY: git-pull-buildcore
|
||||||
docker pull ${DEVENV_IMAGE}
|
git-pull-buildcore:
|
||||||
docker run -d -v $(shell pwd):/usr/src/project \
|
git fetch buildcore-master master
|
||||||
-e LOCAL_USER_ID=$(shell id -u ${USER}) \
|
git subtree pull --prefix deps/buildcore buildcore-master master --squash
|
||||||
--name ${DEVENV} -t ${DEVENV_IMAGE} bash
|
|
||||||
devenv-destroy:
|
|
||||||
docker rm -f ${DEVENV}
|
|
||||||
devenv-shell:
|
|
||||||
${ENV_RUN} bash
|
|
||||||
|
|
||||||
configure-release:
|
.PHONY: git-push-buildcore
|
||||||
${ENV_RUN} rm -rf build/${HOST_ENV}-release
|
git-push-buildcore:
|
||||||
${ENV_RUN} ./scripts/setup_build ${HOST_ENV}
|
git subtree push --prefix=deps/buildcore buildcore-master master
|
||||||
${ENV_RUN} rm -f build/current
|
|
||||||
${ENV_RUN} ln -s ${HOST_ENV}-release build/current
|
|
||||||
|
|
||||||
configure-debug:
|
|
||||||
${ENV_RUN} rm -rf build/${HOST_ENV}-debug
|
|
||||||
${ENV_RUN} ./scripts/setup_build ${HOST_ENV} debug
|
|
||||||
${ENV_RUN} rm -f build/current
|
|
||||||
${ENV_RUN} ln -s ${HOST_ENV}-debug build/current
|
|
||||||
|
|
||||||
configure-asan:
|
|
||||||
${ENV_RUN} rm -rf build/${HOST_ENV}-asan
|
|
||||||
${ENV_RUN} ./scripts/setup_build ${HOST_ENV} asan
|
|
||||||
${ENV_RUN} rm -f build/current
|
|
||||||
${ENV_RUN} ln -s ${HOST_ENV}-asan build/current
|
|
||||||
|
|
||||||
configure-windows:
|
|
||||||
${ENV_RUN} rm -rf build/windows
|
|
||||||
${ENV_RUN} ./scripts/setup_build windows
|
|
||||||
${ENV_RUN} rm -f build/current
|
|
||||||
${ENV_RUN} ln -s windows build/current
|
|
||||||
|
|
||||||
configure-windows-debug:
|
|
||||||
${ENV_RUN} rm -rf build/windows
|
|
||||||
${ENV_RUN} ./scripts/setup_build windows debug
|
|
||||||
${ENV_RUN} rm -f build/current
|
|
||||||
${ENV_RUN} ln -s windows build/current
|
|
||||||
|
|
||||||
configure-gba:
|
|
||||||
${ENV_RUN} rm -rf build/gba-release
|
|
||||||
${ENV_RUN} ./scripts/setup_build gba
|
|
||||||
${ENV_RUN} rm -f build/current
|
|
||||||
${ENV_RUN} ln -s gba-release build/current
|
|
||||||
|
|||||||
Vendored
-24
@@ -1,24 +0,0 @@
|
|||||||
set(CMAKE_SYSTEM_NAME "Generic")
|
|
||||||
|
|
||||||
set(DEVKITARM $ENV{DEVKITARM})
|
|
||||||
|
|
||||||
if(NOT DEVKITARM)
|
|
||||||
message(FATAL_ERROR "DEVKITARM environment variable not set")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER ${DEVKITARM}/bin/arm-none-eabi-gcc)
|
|
||||||
set(CMAKE_CXX_COMPILER ${DEVKITARM}/bin/arm-none-eabi-g++)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH ${DEVKITARM})
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
||||||
|
|
||||||
set(CMAKE_FIND_LIBRARY_PREFIXES lib)
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
|
||||||
|
|
||||||
set(LINKER_FLAGS "-specs=gba.specs")
|
|
||||||
add_definitions (
|
|
||||||
-DARM7
|
|
||||||
)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
Vendored
-18
@@ -1,18 +0,0 @@
|
|||||||
set(CMAKE_SYSTEM_NAME Windows)
|
|
||||||
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
|
|
||||||
|
|
||||||
# cross compilers to use for C and C++
|
|
||||||
set(CMAKE_C_COMPILER /usr/bin/${TOOLCHAIN_PREFIX}-gcc)
|
|
||||||
set(CMAKE_CXX_COMPILER /usr/bin/${TOOLCHAIN_PREFIX}-g++)
|
|
||||||
set(CMAKE_RC_COMPILER /usr/bin/${TOOLCHAIN_PREFIX}-windres)
|
|
||||||
|
|
||||||
# target environment on the build host system
|
|
||||||
# set 1st to dir with the cross compiler's C/C++ headers/libs
|
|
||||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
|
||||||
|
|
||||||
# modify default behavior of FIND_XXX() commands to
|
|
||||||
# search for headers/libs in the target environment and
|
|
||||||
# search for programs in the build host environment
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
||||||
-52
@@ -1,52 +0,0 @@
|
|||||||
# This file belongs Nick Overdijk, and is from https://github.com/NickNick/wubwubcmake
|
|
||||||
# The MIT License (MIT)
|
|
||||||
#
|
|
||||||
# Copyright (c) 2013 Nick Overdijk
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
# this software and associated documentation files (the "Software"), to deal in
|
|
||||||
# the Software without restriction, including without limitation the rights to
|
|
||||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
# subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included in all
|
|
||||||
# copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
||||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
||||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.option(USE_ASAN "Enable Address Sanitizer, if your compiler supports it" ON)
|
|
||||||
|
|
||||||
option(USE_ASAN "Enable Address Sanitizer, if your compiler supports it" OFF)
|
|
||||||
if(USE_ASAN)
|
|
||||||
include(CheckCXXSourceCompiles)
|
|
||||||
# If the compiler understands -fsanitize=address, add it to the flags (gcc since 4.8 & clang since version 3.2)
|
|
||||||
set(CMAKE_REQUIRED_FLAGS_BAK "${CMAKE_REQUIRED_FLAGS}")
|
|
||||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fsanitize=address")
|
|
||||||
CHECK_CXX_SOURCE_COMPILES("int main() { return 0; }" FLAG_FSANA_SUPPORTED)
|
|
||||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_BAK}")
|
|
||||||
|
|
||||||
if(FLAG_FSANA_SUPPORTED)
|
|
||||||
set(asan_flag "-fsanitize=address")
|
|
||||||
else(FLAG_FSANA_SUPPORTED)
|
|
||||||
# Alternatively, try if it understands -faddress-sanitizer (clang until version 3.2)
|
|
||||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -faddress-sanitizer")
|
|
||||||
CHECK_CXX_SOURCE_COMPILES("int main() { return 0; }" FLAG_FASAN_SUPPORTED)
|
|
||||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_BAK}")
|
|
||||||
|
|
||||||
if(FLAG_FASAN_SUPPORTED)
|
|
||||||
set(asan_flag "-faddress-sanitizer")
|
|
||||||
endif(FLAG_FASAN_SUPPORTED)
|
|
||||||
endif(FLAG_FSANA_SUPPORTED)
|
|
||||||
|
|
||||||
if(FLAG_FSANA_SUPPORTED OR FLAG_FASAN_SUPPORTED)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${asan_flag}")
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${asan_flag}")
|
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${asan_flag}")
|
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${asan_flag}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
endif(USE_ASAN)
|
|
||||||
Vendored
Vendored
-8
@@ -1,8 +0,0 @@
|
|||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
make -j release
|
|
||||||
make -j debug
|
|
||||||
make -j
|
|
||||||
make -j test
|
|
||||||
Vendored
-8
@@ -1,8 +0,0 @@
|
|||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
for f in $(find $1 -maxdepth 1 -mindepth 1 -type d)
|
|
||||||
do
|
|
||||||
cmake --build "$f" --target $2 --
|
|
||||||
done
|
|
||||||
Vendored
-34
@@ -1,34 +0,0 @@
|
|||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
project=$(pwd)/
|
|
||||||
|
|
||||||
TARGET=$1
|
|
||||||
BUILD_TYPE=$2
|
|
||||||
|
|
||||||
if [[ $TARGET == windows ]]; then
|
|
||||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/modules/Mingw.cmake"
|
|
||||||
elif [[ $TARGET == gba ]]; then
|
|
||||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/modules/GBA.cmake -DOX_USE_STDLIB=OFF -DCMAKE_INSTALL_PREFIX=$DEVKITARM"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $BUILD_TYPE == asan ]]; then
|
|
||||||
buildTypeArgs="-DUSE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug"
|
|
||||||
buildDir="build/${TARGET}-asan"
|
|
||||||
elif [[ $BUILD_TYPE == debug ]]; then
|
|
||||||
buildTypeArgs="-DCMAKE_BUILD_TYPE=Debug"
|
|
||||||
buildDir="build/${TARGET}-debug"
|
|
||||||
else
|
|
||||||
buildTypeArgs="-DCMAKE_BUILD_TYPE=Release"
|
|
||||||
buildDir="build/${TARGET}-release"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p $buildDir
|
|
||||||
pushd $buildDir
|
|
||||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
||||||
-GNinja \
|
|
||||||
$buildTypeArgs \
|
|
||||||
$toolchain \
|
|
||||||
$project
|
|
||||||
popd
|
|
||||||
Vendored
+27
-1
@@ -1 +1,27 @@
|
|||||||
add_subdirectory(ox)
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
|
set(OX_OS_WINDOWS TRUE)
|
||||||
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||||
|
set(OX_OS_FREEBSD TRUE)
|
||||||
|
else()
|
||||||
|
set(OX_OS_FREEBSD FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
set(OX_OS_LINUX TRUE)
|
||||||
|
else()
|
||||||
|
set(OX_OS_LINUX FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(OX_USE_STDLIB)
|
||||||
|
add_subdirectory(oc)
|
||||||
|
endif()
|
||||||
|
add_subdirectory(clargs)
|
||||||
|
add_subdirectory(claw)
|
||||||
|
add_subdirectory(event)
|
||||||
|
add_subdirectory(fs)
|
||||||
|
add_subdirectory(logconn)
|
||||||
|
add_subdirectory(mc)
|
||||||
|
add_subdirectory(model)
|
||||||
|
add_subdirectory(preloader)
|
||||||
|
add_subdirectory(std)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ endif()
|
|||||||
|
|
||||||
add_library(
|
add_library(
|
||||||
OxClArgs
|
OxClArgs
|
||||||
clargs.cpp
|
src/clargs.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(
|
set_property(
|
||||||
@@ -27,11 +27,16 @@ target_link_libraries(
|
|||||||
OxStd
|
OxStd
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
OxClArgs PUBLIC
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
DIRECTORY
|
||||||
clargs.hpp
|
include/ox
|
||||||
DESTINATION
|
DESTINATION
|
||||||
include/ox/clargs
|
include
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ox/std/string.hpp>
|
#include <ox/std/string.hpp>
|
||||||
#include "clargs.hpp"
|
#include <ox/clargs/clargs.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
add_library(
|
add_library(
|
||||||
OxClaw
|
OxClaw
|
||||||
read.cpp
|
src/read.cpp
|
||||||
write.cpp
|
src/write.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
@@ -27,9 +27,22 @@ target_link_libraries(
|
|||||||
# )
|
# )
|
||||||
#endif()
|
#endif()
|
||||||
|
|
||||||
install(TARGETS OxClaw
|
target_include_directories(
|
||||||
LIBRARY DESTINATION lib
|
OxClaw PUBLIC
|
||||||
ARCHIVE DESTINATION lib
|
include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
DIRECTORY
|
||||||
|
include/ox
|
||||||
|
DESTINATION
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS OxClaw
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if(OX_RUN_TESTS)
|
if(OX_RUN_TESTS)
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <ox/std/buffer.hpp>
|
#include <ox/std/buffer.hpp>
|
||||||
|
|
||||||
#include "read.hpp"
|
#include <ox/claw/read.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "write.hpp"
|
#include <ox/claw/write.hpp>
|
||||||
|
|
||||||
namespace ox::detail {
|
namespace ox::detail {
|
||||||
|
|
||||||
Vendored
+51
@@ -0,0 +1,51 @@
|
|||||||
|
add_library(
|
||||||
|
OxEvent
|
||||||
|
src/signal.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
target_compile_options(OxEvent PRIVATE -Wsign-conversion)
|
||||||
|
target_compile_options(OxEvent PRIVATE -Wconversion)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT OX_BARE_METAL)
|
||||||
|
set_property(
|
||||||
|
TARGET
|
||||||
|
OxEvent
|
||||||
|
PROPERTY
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(
|
||||||
|
OxEvent PUBLIC
|
||||||
|
$<$<BOOL:${OX_USE_STDLIB}>:OX_USE_STDLIB>
|
||||||
|
$<$<BOOL:${OX_NODEBUG}>:OX_NODEBUG>
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(
|
||||||
|
OxEvent PUBLIC
|
||||||
|
OxStd
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
OxEvent PUBLIC
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
DIRECTORY
|
||||||
|
include/ox
|
||||||
|
DESTINATION
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS OxEvent
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
|
)
|
||||||
|
|
||||||
|
if(OX_RUN_TESTS)
|
||||||
|
add_subdirectory(test)
|
||||||
|
endif()
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "signal.hpp"
|
#include <ox/event/signal.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
@@ -5,14 +5,12 @@ endif()
|
|||||||
|
|
||||||
add_library(
|
add_library(
|
||||||
OxFS
|
OxFS
|
||||||
ptrarith/nodebuffer.hpp
|
src/filestore/filestoretemplate.cpp
|
||||||
ptrarith/ptr.hpp
|
src/filesystem/filelocation.cpp
|
||||||
filestore/filestoretemplate.cpp
|
src/filesystem/pathiterator.cpp
|
||||||
filesystem/filelocation.cpp
|
src/filesystem/directory.cpp
|
||||||
filesystem/pathiterator.cpp
|
src/filesystem/filesystem.cpp
|
||||||
filesystem/directory.cpp
|
src/filesystem/passthroughfs.cpp
|
||||||
filesystem/filesystem.cpp
|
|
||||||
filesystem/passthroughfs.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
@@ -33,10 +31,22 @@ target_link_libraries(
|
|||||||
OxMetalClaw
|
OxMetalClaw
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
OxFS PUBLIC
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
DIRECTORY
|
||||||
|
include/ox
|
||||||
|
DESTINATION
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
if(NOT OX_BARE_METAL)
|
if(NOT OX_BARE_METAL)
|
||||||
add_executable(
|
add_executable(
|
||||||
oxfs-tool
|
oxfs-tool
|
||||||
tool.cpp
|
src/tool.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
@@ -52,29 +62,6 @@ if(NOT OX_BARE_METAL)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(
|
|
||||||
FILES
|
|
||||||
filestore/filestoretemplate.hpp
|
|
||||||
DESTINATION
|
|
||||||
include/ox/fs/filestore
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES
|
|
||||||
filesystem/filesystem.hpp
|
|
||||||
filesystem/pathiterator.hpp
|
|
||||||
DESTINATION
|
|
||||||
include/ox/fs/filesystem
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES
|
|
||||||
ptrarith/nodebuffer.hpp
|
|
||||||
ptrarith/ptr.hpp
|
|
||||||
DESTINATION
|
|
||||||
include/ox/fs/ptrarith
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
OxFS
|
OxFS
|
||||||
Vendored
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "filestoretemplate.hpp"
|
#include <ox/fs/filestore/filestoretemplate.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "directory.hpp"
|
#include <ox/fs/filesystem/directory.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
Vendored
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <ox/model/modelops.hpp>
|
#include <ox/model/modelops.hpp>
|
||||||
|
|
||||||
#include "filelocation.hpp"
|
#include <ox/fs/filesystem/filelocation.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <ox/std/error.hpp>
|
#include <ox/std/error.hpp>
|
||||||
#include <ox/std/utility.hpp>
|
#include <ox/std/utility.hpp>
|
||||||
|
|
||||||
#include "filesystem.hpp"
|
#include <ox/fs/filesystem/filesystem.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
Vendored
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <ox/std/error.hpp>
|
#include <ox/std/error.hpp>
|
||||||
|
|
||||||
#include "passthroughfs.hpp"
|
#include <ox/fs/filesystem/passthroughfs.hpp>
|
||||||
|
|
||||||
#if defined(OX_HAS_PASSTHROUGHFS)
|
#if defined(OX_HAS_PASSTHROUGHFS)
|
||||||
|
|
||||||
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <ox/std/memops.hpp>
|
#include <ox/std/memops.hpp>
|
||||||
#include <ox/std/strops.hpp>
|
#include <ox/std/strops.hpp>
|
||||||
#include <ox/std/trace.hpp>
|
#include <ox/std/trace.hpp>
|
||||||
#include "pathiterator.hpp"
|
#include <ox/fs/filesystem/pathiterator.hpp>
|
||||||
|
|
||||||
OX_CLANG_NOWARN_BEGIN(-Wunsafe-buffer-usage)
|
OX_CLANG_NOWARN_BEGIN(-Wunsafe-buffer-usage)
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
|
|||||||
|
|
||||||
add_library(
|
add_library(
|
||||||
OxLogConn
|
OxLogConn
|
||||||
logconn.cpp
|
src/logconn.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(
|
set_property(
|
||||||
@@ -24,12 +24,16 @@ target_link_libraries(
|
|||||||
$<$<BOOL:${OX_OS_WINDOWS}>:ws2_32>
|
$<$<BOOL:${OX_OS_WINDOWS}>:ws2_32>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
OxLogConn PUBLIC
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
DIRECTORY
|
||||||
circularbuff.hpp
|
include/ox
|
||||||
logconn.hpp
|
|
||||||
DESTINATION
|
DESTINATION
|
||||||
include/ox/logconn
|
include
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
Vendored
@@ -23,7 +23,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "logconn.hpp"
|
#include <ox/logconn/logconn.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
add_library(
|
add_library(
|
||||||
OxMetalClaw
|
OxMetalClaw
|
||||||
read.cpp
|
src/read.cpp
|
||||||
write.cpp
|
src/write.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
@@ -24,22 +24,22 @@ if(NOT OX_BARE_METAL)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(
|
target_include_directories(
|
||||||
FILES
|
OxMetalClaw PUBLIC
|
||||||
intops.hpp
|
include
|
||||||
err.hpp
|
|
||||||
mc.hpp
|
|
||||||
presenceindicator.hpp
|
|
||||||
read.hpp
|
|
||||||
types.hpp
|
|
||||||
write.hpp
|
|
||||||
DESTINATION
|
|
||||||
include/ox/mc
|
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS OxMetalClaw
|
install(
|
||||||
LIBRARY DESTINATION lib
|
DIRECTORY
|
||||||
ARCHIVE DESTINATION lib
|
include/ox
|
||||||
|
DESTINATION
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS OxMetalClaw
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if(OX_RUN_TESTS)
|
if(OX_RUN_TESTS)
|
||||||
Vendored
@@ -10,7 +10,7 @@
|
|||||||
#include <ox/std/buffer.hpp>
|
#include <ox/std/buffer.hpp>
|
||||||
#include <ox/std/reader.hpp>
|
#include <ox/std/reader.hpp>
|
||||||
|
|
||||||
#include "read.hpp"
|
#include <ox/mc/read.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <ox/std/memops.hpp>
|
#include <ox/std/memops.hpp>
|
||||||
#include <ox/std/trace.hpp>
|
#include <ox/std/trace.hpp>
|
||||||
|
|
||||||
#include "write.hpp"
|
#include <ox/mc/write.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
Vendored
+45
@@ -0,0 +1,45 @@
|
|||||||
|
add_library(
|
||||||
|
OxModel
|
||||||
|
src/desctypes.cpp
|
||||||
|
src/descwrite.cpp
|
||||||
|
src/modelvalue.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
target_compile_options(OxModel PRIVATE -Wconversion)
|
||||||
|
target_compile_options(OxModel PRIVATE -Wsign-conversion)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(
|
||||||
|
OxModel PUBLIC
|
||||||
|
OxStd
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT OX_BARE_METAL)
|
||||||
|
set_property(
|
||||||
|
TARGET
|
||||||
|
OxModel
|
||||||
|
PROPERTY
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(
|
||||||
|
OxModel PUBLIC
|
||||||
|
OxStd
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
OxModel PUBLIC
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS OxModel
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
|
)
|
||||||
|
|
||||||
|
if(OX_RUN_TESTS)
|
||||||
|
add_subdirectory(test)
|
||||||
|
endif()
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<Type> : <TypeName><FieldList>
|
||||||
|
<FieldList> : <FieldList> | <FieldList><Field>
|
||||||
|
<Field> : <FieldType><TypeID><FieldName>
|
||||||
|
<TypeID> : <TypeName> | <TypeName><Type>
|
||||||
|
<TypeName> : <string>
|
||||||
|
<FieldType> : <0: single> | <1: list>
|
||||||
|
<FieldName> : <string>
|
||||||
Vendored
Vendored
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "desctypes.hpp"
|
#include <ox/model/desctypes.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "descwrite.hpp"
|
#include <ox/model/descwrite.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <ox/std/hashmap.hpp>
|
#include <ox/std/hashmap.hpp>
|
||||||
|
|
||||||
#include "modelvalue.hpp"
|
#include <ox/model/modelvalue.hpp>
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user