diff --git a/CMakeLists.txt b/CMakeLists.txt index bd67674..cddbfee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ include(FetchContent) FetchContent_Declare( googletest GIT_REPOSITORY "https://github.com/google/googletest" - GIT_TAG v1.14.0 + GIT_TAG v1.15.2 GIT_SHALLOW 1 ) # For Windows: Prevent overriding the parent project's compiler/linker settings @@ -92,6 +92,9 @@ endif() # Documentation +option(CUDA_BATTERY_BUILD_DOC "Build documentation" OFF) +if(CUDA_BATTERY_BUILD_DOC) + find_package(Doxygen REQUIRED doxygen) set(DOXYGEN_PROJECT_NAME "Cuda battery library") @@ -122,3 +125,5 @@ doxygen_add_docs(doc_cuda_battery "include/" ALL COMMENT "Generate HTML documentation") + +endif() diff --git a/CMakePresets.json b/CMakePresets.json index ba32fed..3926d9c 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -39,6 +39,17 @@ } } }, + { + "name": "doc", + "hidden": true, + "inherits": "default", + "cacheVariables": { + "CUDA_BATTERY_BUILD_DOC": { + "type": "BOOL", + "value": "ON" + } + } + }, { "name": "debug", "hidden": true, @@ -75,6 +86,16 @@ "description": "Build the project with CUDA NVCC compiler.", "inherits": ["default-gpu","release"] }, + { + "name": "gpu-doc", + "displayName": "GPU Release configuration", + "description": "Build the project and documentation with CUDA NVCC compiler.", + "inherits": [ + "default-gpu", + "release", + "doc" + ] + }, { "name": "cpu-debug", "displayName": "CPU Debug configuration", diff --git a/include/battery/allocator.hpp b/include/battery/allocator.hpp index 611d32f..e637245 100644 --- a/include/battery/allocator.hpp +++ b/include/battery/allocator.hpp @@ -257,7 +257,7 @@ class pool_allocator { control_block* block; public: - CUDA NI pool_allocator() = default; + NI pool_allocator() = default; CUDA NI pool_allocator(const pool_allocator& other): block(other.block)