// SPDX-License-Identifier: BSL-1.0 // Copyright 2025-2026, Amlal El Mahrouss (amlal@nekernel.org) // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Official repository: https://github.com/ocl-foss-org/core #ifndef OCL_CORE_CONFIG #define OCL_CORE_CONFIG #ifndef OCL_FREESTANDING #include #include #include #include #include #include #include #include #include #include #endif #define OCL_DEPRECATED() [[deprecated]] #define OCL_DEPRECATED_MSG(MSG) [[deprecated(MSG)]] #if 202002L > __cplusplus #error !! OCL.Core works with C++20 and greater !! #endif #ifdef __cplusplus #define OCL_DECL extern "C" /// DLL/Dylib/So specific macro. #ifdef __GNUC__ #define OCL_EXPORT_DECL OCL_DECL __attribute__((visibility("default"))) #else #define OCL_EXPORT_DECL OCL_DECL declspec(dllexport) #endif #else #define OCL_DECL #ifdef __GNUC__ #define OCL_EXPORT_DECL #else #define OCL_EXPORT_DECL OCL_DECL declspec(dllimport) #endif #endif #ifdef _WIN32 #define OCL_USE_CRLF_ENDINGS 1 #define OCL_WINDOWS 1 #endif #if OCL_WANTS_PRAGMA_ONCE #define OCL_HAS_PRAGMA_ONCE 1 #endif namespace ocl { namespace detail { inline void throw_runtime_error(const boost::source_location& loc = BOOST_CURRENT_LOCATION) { throw std::runtime_error(loc.to_string()); } } // namespace detail } // namespace ocl #endif