bx: Add bx.test and bx.bench

This commit is contained in:
Sandy Carter
2023-01-07 22:03:40 -05:00
committed by Sandy
parent 99537daccd
commit 576c2b9694
2 changed files with 33 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ option(BGFX_BUILD_TOOLS_SHADER "Build bgfx shader tools." ON)
option(BGFX_BUILD_TOOLS_GEOMETRY "Build bgfx geometry tools." ON)
option(BGFX_BUILD_TOOLS_TEXTURE "Build bgfx texture tools." ON)
option(BGFX_BUILD_EXAMPLES "Build bgfx examples." ON)
option(BGFX_BUILD_TESTS "Build bgfx tests." OFF)
option(BGFX_INSTALL "Create installation target." ON)
option(BGFX_INSTALL_EXAMPLES "Install examples and their runtimes." OFF)
option(BGFX_CUSTOM_TARGETS "Include convenience custom targets." ON)
@@ -66,6 +67,10 @@ if(BGFX_LIBRARY_TYPE MATCHES "SHARED")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
if(BGFX_BUILD_TESTS)
enable_testing()
endif()
if(NOT BX_DIR)
set(BX_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bx" CACHE STRING "Location of bx.")
elseif(NOT IS_ABSOLUTE "${BX_DIR}")