From: Juan Ramos Date: Wed, 1 Feb 2023 00:27:25 +0000 (-0700) Subject: cmake: Remove pointless conditionals X-Git-Tag: upstream/1.3.268~230 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bc9d7c0c508d3d9c7d5ac4e59e0a9636bb57e34;p=platform%2Fupstream%2FVulkan-Loader.git cmake: Remove pointless conditionals CMake min is now 3.17 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b9d5dc..139b886 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,12 +214,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clan target_compile_options(loader_common_options INTERFACE /GR- /guard:cf /wd4100 /wd4152 /wd4201) # Enable control flow guard - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0") - target_link_options(loader_common_options INTERFACE "LINKER:/guard:cf") - else() - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf") - endif() + target_link_options(loader_common_options INTERFACE "LINKER:/guard:cf") # Prevent from polluting the code. guards against things like MIN and MAX target_compile_definitions(loader_common_options INTERFACE WIN32_LEAN_AND_MEAN) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index a68fd54..9e1279c 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -328,13 +328,8 @@ else() # Build vulkan.framework # Use GLOB_RECURSE to find all the header files and populate the vulkan.framework headers with them # Use CONFIGURE_DEPENDS to ensure that if the header files are updated, this list is also updated - # Note: CONFIGURE_DEPENDS is a 3.12 feature - gate it for now and remove when CMake minimum version is higher get_target_property(VulkanHeaders_INCLUDE_DIRS Vulkan::Headers INTERFACE_INCLUDE_DIRECTORIES) - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0") - file(GLOB_RECURSE CONFIGURE_DEPENDS FRAMEWORK_HEADERS ${VulkanHeaders_INCLUDE_DIRS}) - else() - file(GLOB_RECURSE FRAMEWORK_HEADERS ${VulkanHeaders_INCLUDE_DIRS}) - endif() + file(GLOB_RECURSE CONFIGURE_DEPENDS FRAMEWORK_HEADERS ${VulkanHeaders_INCLUDE_DIRS}) if(BUILD_STATIC_LOADER) add_library(vulkan-framework STATIC ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} ${FRAMEWORK_HEADERS}) else()