@@ -0,0 +1,24 @@
|
|||||||
|
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
|
||||||
|
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
|
||||||
|
name: CMake on a single platform
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build tests
|
||||||
|
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||||
|
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||||
|
run: ./build_tests.bat
|
||||||
|
- name: Start tests
|
||||||
|
run: ./build/bin/Release/Tests.exe
|
||||||
|
|
||||||
@@ -154,9 +154,19 @@ static void add_owner(object_ptr<Ty>& ptr)
|
|||||||
if (ptr_) counter::remove_object<Ty>(ptr_);
|
if (ptr_) counter::remove_object<Ty>(ptr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ty* get() const noexcept { return ptr_.load(); }
|
Ty* get() const { return ptr_.load(); }
|
||||||
Ty& operator*() const noexcept { return *ptr_; }
|
Ty& operator*() const
|
||||||
Ty* operator->() const noexcept { return ptr_.load(); }
|
{
|
||||||
|
if (!ptr_.load())
|
||||||
|
throw std::runtime_error("Null pointer");
|
||||||
|
return *ptr_;
|
||||||
|
}
|
||||||
|
Ty* operator->() const
|
||||||
|
{
|
||||||
|
if (!ptr_.load())
|
||||||
|
throw std::runtime_error("Null pointer");
|
||||||
|
return ptr_.load();
|
||||||
|
}
|
||||||
operator bool() const noexcept { return ptr_.load() != nullptr; }
|
operator bool() const noexcept { return ptr_.load() != nullptr; }
|
||||||
object_ptr<Ty>& operator=(const object_ptr<Ty>& ptr)
|
object_ptr<Ty>& operator=(const object_ptr<Ty>& ptr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
@echo off
|
||||||
|
mkdir .\build
|
||||||
|
cd build
|
||||||
|
cmake -DBUILD_MODE=Engine ..
|
||||||
|
cmake --build . --config Release
|
||||||
|
cd ..
|
||||||
|
mkdir ".\build\bin\include"
|
||||||
|
robocopy ".\Core" ".\build\bin\include\Core" *.h *.hpp /S
|
||||||
|
robocopy ".\Delegate" ".\build\bin\include\Delegate" *.h *.hpp /S
|
||||||
|
robocopy ".\FastRTTI" ".\build\bin\include\FastRTTI" *.h *.hpp /S
|
||||||
|
pause
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
@echo off
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DBUILD_MODE=Tests ..
|
||||||
|
cmake --build . --config Release
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -A Win32
|
cmake -DBUILD_MODE=All .. -A Win32
|
||||||
pause
|
pause
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -A x64
|
cmake -DBUILD_MODE=All .. -A x64
|
||||||
pause
|
pause
|
||||||
Reference in New Issue
Block a user