Skip to content

Commit

Permalink
Minor CMake cleanup
Browse files Browse the repository at this point in the history
Remove USE_CCACHE
Remove CMAKE_OSX_DEPLOYMENT_TARGET
Remove FALLBACK_CONFIG_DIRS / FALLBACK_DATA_DIRS

Properly set enable_testing()
  • Loading branch information
juan-lunarg committed Aug 18, 2023
1 parent 31d0dcd commit c5b7752
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
21 changes: 2 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
cmake_minimum_required(VERSION 3.17.2)

enable_testing()

set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version")

project (VULKAN_TOOLS)
project(VULKAN_TOOLS)

set(API_NAME "Vulkan" CACHE STRING "API name")
add_definitions(-DAPI_NAME="${API_NAME}")
Expand Down Expand Up @@ -93,22 +89,8 @@ endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(VULKANTOOLS_TARGET_FOLDER vt_cmake_targets)

option(USE_CCACHE "Use ccache" OFF)
if (USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
endif()

option(BUILD_WERROR "Treat compiler warnings as errors" ON)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME MATCHES "BSD")
set(FALLBACK_CONFIG_DIRS "/etc/xdg" CACHE STRING
"Search path to use when XDG_CONFIG_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant.")
set(FALLBACK_DATA_DIRS "/usr/local/share:/usr/share" CACHE STRING
"Search path to use when XDG_DATA_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant.")

if(BUILD_WERROR)
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Werror)
Expand Down Expand Up @@ -202,6 +184,7 @@ function(run_vulkantools_video_xml_generate dependency output)
endfunction()

if(BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()

Expand Down
2 changes: 1 addition & 1 deletion scripts/github_ci_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def BuildVT(args):

CreateBuildDirectory(VT_BUILD_DIR)
print("Run CMake")
cmake_cmd = 'cmake -C ../%s/helper.cmake -DCMAKE_BUILD_TYPE=%s -DUSE_CCACHE=ON ..' % (EXTERNAL_DIR_NAME, args.configuration.capitalize())
cmake_cmd = 'cmake -C ../%s/helper.cmake -DCMAKE_BUILD_TYPE=%s ..' % (EXTERNAL_DIR_NAME, args.configuration.capitalize())
RunShellCmd(cmake_cmd, VT_BUILD_DIR)

print("Build Vulkan Tools")
Expand Down
2 changes: 1 addition & 1 deletion scripts/github_ci_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def BuildVT(args):

CreateBuildDirectory(VT_BUILD_DIR)
print("Run CMake")
cmake_cmd = 'cmake -A %s -C ../%s/helper.cmake -DUSE_CCACHE=ON ..' % (args.arch, EXTERNAL_DIR_NAME)
cmake_cmd = 'cmake -A %s -C ../%s/helper.cmake ..' % (args.arch, EXTERNAL_DIR_NAME)
RunShellCmd(cmake_cmd, VT_BUILD_DIR)

print("Build Vulkan Tools")
Expand Down

0 comments on commit c5b7752

Please sign in to comment.