Fixes
This commit is contained in:
@ -104,7 +104,8 @@ FetchContent_Declare(
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
highway
|
highway
|
||||||
GIT_REPOSITORY https://github.com/google/highway.git
|
GIT_REPOSITORY https://github.com/google/highway.git
|
||||||
GIT_TAG 1.3.0
|
GIT_TAG 1.3.0
|
||||||
|
SYSTEM
|
||||||
)
|
)
|
||||||
|
|
||||||
set(MI_OVERRIDE ON CACHE BOOL "" FORCE)
|
set(MI_OVERRIDE ON CACHE BOOL "" FORCE)
|
||||||
@ -121,15 +122,17 @@ set(HTTPLIB_COMPILE OFF CACHE BOOL "" FORCE)
|
|||||||
set(HTTPLIB_TEST OFF CACHE BOOL "" FORCE)
|
set(HTTPLIB_TEST OFF CACHE BOOL "" FORCE)
|
||||||
set(HTTPLIB_EXAMPLE OFF CACHE BOOL "" FORCE)
|
set(HTTPLIB_EXAMPLE OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
FetchContent_MakeAvailable(zlib zstd httplib pugixml nlohmann_json glaze simdjson tl-expected unordered_dense mimalloc highway)
|
FetchContent_MakeAvailable(zlib zstd)
|
||||||
|
|
||||||
if(NOT TARGET simdjson::simdjson)
|
|
||||||
add_library(simdjson::simdjson ALIAS simdjson)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT TARGET zstd::libzstd)
|
if(NOT TARGET zstd::libzstd)
|
||||||
add_library(zstd::libzstd ALIAS libzstd_static)
|
add_library(zstd::libzstd ALIAS libzstd_static)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
get_target_property(HWY_INCLUDE_DIRS hwy INTERFACE_INCLUDE_DIRECTORIES)
|
FetchContent_MakeAvailable(httplib pugixml nlohmann_json glaze simdjson tl-expected unordered_dense mimalloc highway)
|
||||||
target_include_directories(hwy SYSTEM INTERFACE ${HWY_INCLUDE_DIRS})
|
|
||||||
|
if(NOT TARGET simdjson::simdjson)
|
||||||
|
add_library(simdjson::simdjson ALIAS simdjson)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_options(hwy PRIVATE -w)
|
||||||
|
target_compile_options(libzstd_static PRIVATE -w)
|
||||||
|
|||||||
@ -26,13 +26,7 @@ cmake --preset windows-x64
|
|||||||
cmake --build --preset windows-x64
|
cmake --build --preset windows-x64
|
||||||
```
|
```
|
||||||
|
|
||||||
**3. Test (Optional)**
|
### Available Presets
|
||||||
|
|
||||||
```bash
|
|
||||||
ctest --preset windows-x64
|
|
||||||
```
|
|
||||||
|
|
||||||
### Presets
|
|
||||||
|
|
||||||
|Preset |Description |Toolchain |
|
|Preset |Description |Toolchain |
|
||||||
|-------------|------------------------------|------------------------------------|
|
|-------------|------------------------------|------------------------------------|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
namespace IACore
|
namespace IACore
|
||||||
{
|
{
|
||||||
Logger::ELogLevel Logger::s_logLevel{Logger::ELogLevel::WARN};
|
Logger::ELogLevel Logger::s_logLevel{Logger::ELogLevel::INFO};
|
||||||
std::ofstream Logger::s_logFile{};
|
std::ofstream Logger::s_logFile{};
|
||||||
|
|
||||||
VOID Logger::Initialize()
|
VOID Logger::Initialize()
|
||||||
|
|||||||
@ -19,6 +19,33 @@
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
# include <IACore/Logger.hpp>
|
||||||
|
|
||||||
|
# define IACORE_MAIN() \
|
||||||
|
Expected<INT32, String> _app_entry(IN CONST Vector<String> &args); \
|
||||||
|
int main(int argc, char *argv[]) \
|
||||||
|
{ \
|
||||||
|
int exitCode = 0; \
|
||||||
|
IACore::Initialize(); \
|
||||||
|
Vector<String> args; \
|
||||||
|
for (int i = 0; i < argc; i++) \
|
||||||
|
args.push_back(argv[i]); \
|
||||||
|
const auto result = _app_entry(args); \
|
||||||
|
if (!result) \
|
||||||
|
{ \
|
||||||
|
IACore::Logger::Error("Application exited with an error: '{}'.", result.error()); \
|
||||||
|
exitCode = -20; \
|
||||||
|
} \
|
||||||
|
exitCode = *result; \
|
||||||
|
if (!exitCode) \
|
||||||
|
IACore::Logger::Info("Application exited successfully."); \
|
||||||
|
else \
|
||||||
|
IACore::Logger::Error("Application exited with error code: {}.", exitCode); \
|
||||||
|
IACore::Terminate(); \
|
||||||
|
return exitCode; \
|
||||||
|
} \
|
||||||
|
Expected<INT32, String> _app_entry(IN CONST Vector<String> &args)
|
||||||
|
|
||||||
namespace IACore
|
namespace IACore
|
||||||
{
|
{
|
||||||
// Must be called from main thread
|
// Must be called from main thread
|
||||||
|
|||||||
Reference in New Issue
Block a user