Header-only library providing common utilities for VertexNova projects.
- Platform Detection - Macros for Windows, macOS, iOS, visionOS, Android, Linux, Web
- Compiler Detection - MSVC, GCC, Clang identification
- Architecture Detection - x64, x86, ARM64, ARM
- Assertions - Debug-only assertions with messages
- Utility Macros - Force inline, branch hints, unused variable marking
| Header | Description |
|---|---|
vertexnova/common/common.h |
Main include (includes all headers) |
vertexnova/common/platform.h |
Platform, compiler, architecture detection |
vertexnova/common/macros.h |
Assertions and utility macros |
Add as a submodule:
git submodule add git@github.com:vertexnova/vnecommon.git libs/vnecommonIn your CMakeLists.txt:
add_subdirectory(libs/vnecommon)
target_link_libraries(your_target PRIVATE vne::common)In your C++ code:
#include "vertexnova/common/common.h"
void example() {
VNE_ASSERT_MSG(ptr != nullptr, "Pointer must not be null");
VNE_UNUSED(some_variable);
#if defined(VNE_PLATFORM_MACOS)
// macOS-specific code
#endif
}# Debug build with examples
./scripts/build_macos.sh
# Release build
./scripts/build_macos.sh --release
# Clean build
./scripts/build_macos.sh --clean# Debug build with examples
python scripts/build_windows.py
# Release build
python scripts/build_windows.py --release
# Clean build
python scripts/build_windows.py --cleancmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON
cmake --build build --config Release- C++20 or later
- CMake 3.16 or later
- Python 3.8+ (for Windows build script)
Apache License 2.0 - See LICENSE for details.