Skip to content

Commit

Permalink
Make toCPP conditional in CMake
Browse files Browse the repository at this point in the history
1) Make the build of the `ToCpp` source conditional based on the makefile
   flag `GFXRECON_TOCPP_SUPPORT`.  If this is set to `ON`, it will build
   the source.  Otherwise, it will not build the files.  This is because
   the software is considered to be in an Alpha state.

2) Make some more coding standards adjustments.

3) Modified argument handling in the tocpp `main.cpp` source file

4) Update the README.md in the `tocpp` tools folder to detail
   how to use the tool and what the current limitations are.
  • Loading branch information
MarkY-LunarG committed Nov 27, 2023
1 parent 7ace46d commit 4857e70
Show file tree
Hide file tree
Showing 26 changed files with 8,039 additions and 7,910 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ if(${GFXRECON_ENABLE_RELEASE_ASSERTS})
add_definitions(-DGFXRECON_ENABLE_RELEASE_ASSERTS)
endif()

option(GFXRECON_TOCPP_SUPPORT "Build ToCpp export tool as part of GFXReconstruct builds." OFF)

if(MSVC)

# The host toolchain architecture (i.e. are the compiler and other tools compiled to ARM/Intel 32bit/64bit binaries):
Expand Down
46 changes: 22 additions & 24 deletions framework/decode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,20 @@ target_sources(gfxrecon_decode
${CMAKE_CURRENT_LIST_DIR}/struct_pointer_decoder.h
${CMAKE_CURRENT_LIST_DIR}/swapchain_image_tracker.h
${CMAKE_CURRENT_LIST_DIR}/value_decoder.h
${CMAKE_CURRENT_LIST_DIR}/marker_consumer_base.h
${CMAKE_CURRENT_LIST_DIR}/metadata_consumer_base.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_consumer_base.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_consumer_base.cpp
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_loader_generator.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_loader_generator.cpp
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_pre_process_consumer_base.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_pre_process_consumer_base.cpp
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_resource_tracker.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_resource_tracker.cpp
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_structs.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_structs.cpp
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_utilities.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_utilities.cpp
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_util_datapack.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_util_datapack.cpp
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_consumer_base.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_consumer_base.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_loader_generator.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_loader_generator.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_pre_process_consumer_base.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_pre_process_consumer_base.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_resource_tracker.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_resource_tracker.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_structs.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_structs.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_utilities.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_utilities.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_util_datapack.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_CURRENT_LIST_DIR}/vulkan_cpp_util_datapack.cpp>
${CMAKE_CURRENT_LIST_DIR}/vulkan_consumer_base.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_stats_consumer.h
${CMAKE_CURRENT_LIST_DIR}/stat_decoder_base.h
Expand Down Expand Up @@ -185,15 +183,15 @@ target_sources(gfxrecon_decode
${CMAKE_CURRENT_LIST_DIR}/vulkan_offscreen_swapchain.h
${CMAKE_CURRENT_LIST_DIR}/vulkan_offscreen_swapchain.cpp
${CMAKE_CURRENT_LIST_DIR}/window.h
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_consumer.h
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_consumer.cpp
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_pre_process_consumer.h
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_pre_process_consumer.cpp
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_consumer.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_consumer.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_pre_process_consumer.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_pre_process_consumer.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_structs.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_structs.cpp>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_consumer_extension.h>
$<$<BOOL:${GFXRECON_TOCPP_SUPPORT}>:${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_consumer_extension.cpp>
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_consumer.h
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_structs.h
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_structs.cpp
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_consumer_extension.h
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_cpp_consumer_extension.cpp
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_decoder.h
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_decoder.cpp
${CMAKE_SOURCE_DIR}/framework/generated/generated_vulkan_enum_to_json.h
Expand Down
Loading

0 comments on commit 4857e70

Please sign in to comment.