diff --git a/CMakeLists.txt b/CMakeLists.txt index 66d1e88b1..fa608c3f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,25 +67,25 @@ option(BUILD_SHARED_LIBS "Build libraries as shared libraries" ON) message(STATUS "General purpose GPU compute framework built on Vulkan") message(STATUS "=======================================================") # Enable or disable targets -kompute_option(KOMPUTE_OPT_BUILD_TESTS "Enable if you want to build tests" OFF) -kompute_option(KOMPUTE_OPT_CODE_COVERAGE "Enable if you want code coverage" OFF) -kompute_option(KOMPUTE_OPT_BUILD_DOCS "Enable if you want to build documentation" OFF) -kompute_option(KOMPUTE_OPT_INSTALL "Enable if you want to enable installation" OFF) +kompute_option(KOMPUTE_OPT_BUILD_TESTS "Enable if you want to build tests." OFF) +kompute_option(KOMPUTE_OPT_CODE_COVERAGE "Enable if you want code coverage." OFF) +kompute_option(KOMPUTE_OPT_BUILD_DOCS "Enable if you want to build documentation." OFF) +kompute_option(KOMPUTE_OPT_INSTALL "Enable if you want to enable installation." OFF) # Build options -kompute_option(KOMPUTE_OPT_BUILD_PYTHON "Enable if you want to build python bindings" OFF) -kompute_log_level(KOMPUTE_OPT_LOG_LEVEL "Internally we use spdlog for logging. The log level used can be changed here." "Off") -kompute_option(KOMPUTE_OPT_ANDROID_BUILD "Enable android compilation flags required" OFF) -kompute_option(KOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS "Explicitly disable debug layers even on debug" OFF) +kompute_option(KOMPUTE_OPT_BUILD_PYTHON "Enable if you want to build python bindings." OFF) +kompute_log_level(KOMPUTE_OPT_LOG_LEVEL "Internally we use spdlog for logging. The log level used can be changed here." "Default") +kompute_option(KOMPUTE_OPT_ANDROID_BUILD "Enable android compilation flags required." OFF) +kompute_option(KOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS "Explicitly disable debug layers even on debug." OFF) kompute_option(KOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK "Whether to check if your driver supports the Vulkan Header version you are linking against. This might be useful in case you build shared on a different system than you run later." OFF) # External components -kompute_option(KOMPUTE_OPT_USE_BUILD_IN_SPDLOG "Use the build in version of Spdlog" ON) -kompute_option(KOMPUTE_OPT_USE_BUILD_IN_FMT "Use the build in version of fmt" ON) -kompute_option(KOMPUTE_OPT_USE_BUILD_IN_GOOGLE_TEST "Use the build in version of GoogleTest" ON) -kompute_option(KOMPUTE_OPT_USE_BUILD_IN_PYBIND11 "Use the build in version of pybind11" ON) +kompute_option(KOMPUTE_OPT_USE_BUILD_IN_SPDLOG "Use the build in version of Spdlog." ON) +kompute_option(KOMPUTE_OPT_USE_BUILD_IN_FMT "Use the build in version of fmt." ON) +kompute_option(KOMPUTE_OPT_USE_BUILD_IN_GOOGLE_TEST "Use the build in version of GoogleTest." ON) +kompute_option(KOMPUTE_OPT_USE_BUILD_IN_PYBIND11 "Use the build in version of pybind11." ON) kompute_option(KOMPUTE_OPT_USE_BUILD_IN_VULKAN_HEADER "Use the build in version of Vulkan Headers. This could be helpful in case your system Vulkan Headers are to new for your driver. If you set this to false, please make sure your system Vulkan Header are supported by your driver." ON) -kompute_option_string(KOMPUTE_OPT_BUILD_IN_VULKAN_HEADER_TAG "The git tag used for the build in Vulkan Headers when 'KOMPUTE_OPT_USE_BUILD_IN_VULKAN_HEADER' is enabled. A list of tags can be found here: https://github.com/KhronosGroup/Vulkan-Headers/tags" "v1.2.203") +kompute_option_string(KOMPUTE_OPT_BUILD_IN_VULKAN_HEADER_TAG "The git tag used for the build in Vulkan Headers when 'KOMPUTE_OPT_USE_BUILD_IN_VULKAN_HEADER' is enabled. A list of tags can be found here: https://github.com/KhronosGroup/Vulkan-Headers/tags" "v1.2.203") message(STATUS "=======================================================") ##################################################### diff --git a/docs/overview/build-system.rst b/docs/overview/build-system.rst index 34b041f60..9b90a350f 100644 --- a/docs/overview/build-system.rst +++ b/docs/overview/build-system.rst @@ -20,45 +20,37 @@ This by default configures without any of the extra build tasks (such as buildin * - -DCMAKE_INSTALL_PREFIX="build/src/CMakefiles/Export/" - Enables local installation (which won't require admin privileges) * - -DCMAKE_TOOLCHAIN_FILE="..." - - This is the path for your package manager if you use it such as vcpkg + - This is the path for your package manager if you use it such as vcpkg. * - -DKOMPUTE_OPT_BUILD_TESTS=ON - - Enable if you wish to build and run the tests (must have deps installed. + - Enable if you want to build tests. * - -DKOMPUTE_OPT_CODE_COVERAGE=ON - - Enable if you wish to build and run code coverage (must have deps installed which are limited to Windows platform) + - Enable if you want code coverage. * - -DKOMPUTE_OPT_BUILD_DOCS=ON - - Enable if you wish to build the docs (must have docs deps installed) - * - -DKOMPUTE_OPT_BUILD_SHADERS=ON - - Option to build the single header file using "quom" utility - * - -DKOMPUTE_OPT_INSTALL=OFF - - Disables the install step in the cmake file (useful for android build) + - Enable if you want to build documentation. + * - -DKOMPUTE_OPT_INSTALL=ON + - Enable if you want to enable installation. * - -DKOMPUTE_OPT_BUILD_PYTHON=ON - - Enable to build python bindings (used internally for python package) - * - -DKOMPUTE_OPT_ENABLE_SPDLOG=ON - - Enable to compile with spdlog as the internal logging framework - * - -DKOMPUTE_OPT_USE_BUILD_IN_SPDLOG=ON - - Use the build in version of Spdlog - * - -KOMPUTE_OPT_USE_BUILD_IN_FMT=ON - - Use the build in version of fmt - * - -KOMPUTE_OPT_USE_BUILD_IN_GOOGLE_TEST=ON - - Use the build in version of GoogleTest - * - -KOMPUTE_OPT_USE_BUILD_IN_PYBIND11=ON - - Use the build in version of pybind11 - * - -KOMPUTE_OPT_USE_BUILD_IN_VULKAN_HEADER=ON - - Use the build in version of Vulkan Headers. This could be helpful in case your system Vulkan Headers are to new for your driver. If you set this to false, please make sure your system Vulkan Header are supported by your driver. - * - -KOMPUTE_OPT_BUILD_IN_VULKAN_HEADER_TAG="v1.2.203" - - The git tag used for the build in Vulkan Headers when 'KOMPUTE_OPT_USE_BUILD_IN_VULKAN_HEADER' is enabled. A list of tags can be found here: https://github.com/KhronosGroup/Vulkan-Headers/tags - * - -KOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=OFF - - Whether to check if your driver supports the Vulkan Header version you are linking against. This might be useful in case you build shared on a different system than you run later. + - Enable if you want to build python bindings. + * - -DKOMPUTE_OPT_LOG_LEVEL="Trace" + - Internally we use spdlog for logging. The log level used can be changed here. * - -DKOMPUTE_OPT_ANDROID_BUILD=ON - - Enables android build which includes and excludes relevant libraries + - Enable android compilation flags required. * - -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=ON - - Explicitly disables debug layers even when on debug mode - * - -DKOMPUTE_OPT_DEPENDENCIES_SHARED_LIBS=ON - - Ensures dependencies are referenced as shared libraries for kompute install - * - -DKOMPUTE_OPT_BUILD_AS_SHARED_LIB=ON - - Whether to build Kompute as shared lib instead of static - * - -DKOMPUTE_EXTRA_CXX_FLAGS="..." - - Allows you to pass extra config flags to compiler + - Explicitly disable debug layers even on debug. + * - -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON + - Whether to check if your driver supports the Vulkan Header version you are linking against. This might be useful in case you build shared on a different system than you run later. + * - -DKOMPUTE_OPT_USE_BUILD_IN_SPDLOG=ON + - Use the build in version of Spdlog. + * - -DKOMPUTE_OPT_USE_BUILD_IN_FMT=ON + - Use the build in version of fmt. + * - -DKOMPUTE_OPT_USE_BUILD_IN_GOOGLE_TEST=ON + - Use the build in version of GoogleTest. + * - -DKOMPUTE_OPT_USE_BUILD_IN_PYBIND11=ON + - Use the build in version of pybind11. + * - -DKOMPUTE_OPT_USE_BUILD_IN_VULKAN_HEADER=ON + - Use the build in version of Vulkan Headers. This could be helpful in case your system Vulkan Headers are to new for your driver. If you set this to false, please make sure your system Vulkan Header are supported by your driver. + * - -DKOMPUTE_OPT_BUILD_IN_VULKAN_HEADER_TAG="v1.2.203" + - The git tag used for the build in Vulkan Headers when 'KOMPUTE_OPT_USE_BUILD_IN_VULKAN_HEADER' is enabled. A list of tags can be found here: https://github.com/KhronosGroup/Vulkan-Headers/tags Compile Flags ~~~~~~~~~~~~~ @@ -70,27 +62,7 @@ Compile Flags - Description * - KOMPUTE_CREATE_PIPELINE_RESULT_VALUE - Ensure the return value of createPipeline is processed as ResultValue instead of Result - * - -DKOMPUTE_VK_API_VERSION="..." - - Sets the default api version to use for kompute api - * - -DKOMPUTE_VK_API_MAJOR_VERSION=ON - - Major version to use for the Vulkan SDK - * - -DKOMPUTE_VK_API_MINOR_VERSION=ON - - Minor version to use for the Vulkan SDK - * - -DKOMPUTE_ENABLE_SPDLOG=ON - - Enables the build with SPDLOG and FMT dependencies (must be installed) - * - -DKOMPUTE_LOG_OVERRIDE=ON - - Does not define the SPDLOG_\ :raw-html-m2r:`` macros if these are to be overridden - * - -DKOMPUTE_LOG_LEVEL - - The level for the log level on compile level (also sets spdlog level if enabled) - * - -DVVK_USE_PLATFORM_ANDROID_KHR - - Flag to enable android imports in kompute (enabled with -DKOMPUTE_OPT_ANDROID_BUILD) - * - -DRELEASE=ON - - Enable release build (enabled by cmake release build) - * - -DDEBUG=ON - - Enable debug build including debug flags (enabled by cmake debug build) - * - -DKOMPUTE_DISABLE_VK_DEBUG_LAYERS - - Disable the debug Vulkan SDK Layers, mainly used for android builds - + Other CMake Flags ~~~~~~~~~~~~~~~~~ @@ -115,21 +87,3 @@ Required dependencies ~~~~~~~~~~~~~~~~~~~~~ The only required dependency in the build is the Vulkan SDK. More specifically, the header files vulkan.h and vulkan.hpp, which are both part of the Vulkan SDK. If you haven't installed the Vulkan SDK yet, you can `download it here `_. - -Optional dependencies -~~~~~~~~~~~~~~~~~~~~~ - -SPDLOG is the preferred logging library, however by default Kompute runs without SPDLOG by overriding the macros. It also provides an easy way to override the macros if you prefer to bring your own logging framework. The macro override is the following: - -.. code-block:: c++ - - #ifndef KOMPUTE_LOG_OVERRIDE // Use this if you want to define custom macro overrides - #if KOMPUTE_SPDLOG_ENABLED // Use this if you want to enable SPDLOG - #include - #endif //KOMPUTE_SPDLOG_ENABLED - // ... Otherwise it adds macros that use std::cout (and only print first element) - #endif // KOMPUTE_LOG_OVERRIDE - -You can choose to build with or without SPDLOG by using the cmake flag ``KOMPUTE_OPT_ENABLE_SPDLOG``. - -Finally, remember that you will still need to set both the compile time log level with ``SPDLOG_ACTIVE_LEVEL``\ , and the runtime log level with ``spdlog::set_level(spdlog::level::debug);``.