Skip to content

Commit 9160898

Browse files
committed
Add log config to per-layer CMake
1 parent 846314c commit 9160898

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ set(CMAKE_CXX_STANDARD 20)
2727

2828
project(libGPULayers_UnitTests VERSION 1.0.0)
2929

30-
# Standard CMake components
31-
include(source_common/compiler_helper.cmake)
32-
33-
# Build steps
30+
# Common configuration
3431
set(LGL_UNITTEST ON)
32+
set(LGL_CONFIG_TRACE 1)
33+
set(LGL_CONFIG_LOG 1)
34+
35+
include(source_common/compiler_helper.cmake)
3536

3637
# Build GoogleTest framework
3738
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)

generator/vk_codegen/root_CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ project({PROJECT_NAME} VERSION 1.0.0)
2929

3030
# Common configuration
3131
set(LGL_LOG_TAG "{LAYER_NAME}")
32+
set(LGL_CONFIG_TRACE 0)
33+
set(LGL_CONFIG_LOG 1)
34+
3235
include(../source_common/compiler_helper.cmake)
3336

3437
# Build steps

layer_example/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ project(VkLayerExample VERSION 1.0.0)
2929

3030
# Common configuration
3131
set(LGL_LOG_TAG "VkLayerExample")
32+
set(LGL_CONFIG_TRACE 1)
33+
set(LGL_CONFIG_LOG 1)
34+
3235
include(../source_common/compiler_helper.cmake)
3336

3437
# Build steps

source_common/compiler_helper.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,7 @@ macro(lgl_set_build_options BUILD_TARGET_NAME)
7171
target_compile_definitions(
7272
${BUILD_TARGET_NAME} PRIVATE
7373
$<$<PLATFORM_ID:Android>:VK_USE_PLATFORM_ANDROID_KHR=1>
74-
$<$<PLATFORM_ID:Android>:LGL_LOG_TAG="${LGL_LOG_TAG}">)
74+
$<$<PLATFORM_ID:Android>:LGL_LOG_TAG="${LGL_LOG_TAG}">
75+
CONFIG_TRACE=${LGL_CONFIG_TRACE}
76+
CONFIG_LOG=${LGL_CONFIG_LOG})
7577
endmacro()

0 commit comments

Comments
 (0)