Cleanup in CMakeLists.txt (#1572)
This commit is contained in:
committed by
GitHub
parent
d4d0ac4859
commit
40e76b7c24
@@ -12,11 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
if( NOT TESTS_BUILD_ONLY_DYNAMIC )
|
||||
if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
|
||||
vulkan_hpp__setup_test( NAME ArrayProxy )
|
||||
|
||||
set_target_properties( ArrayProxy PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( ArrayProxy PRIVATE utils )
|
||||
endif()
|
||||
@@ -12,11 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
if( NOT TESTS_BUILD_ONLY_DYNAMIC )
|
||||
if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
|
||||
vulkan_hpp__setup_test( NAME ArrayProxyNoTemporaries )
|
||||
|
||||
set_target_properties( ArrayProxyNoTemporaries PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( ArrayProxyNoTemporaries PRIVATE utils )
|
||||
endif()
|
||||
@@ -12,30 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
option( TESTS_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
|
||||
option( TESTS_BUILD_ONLY_DYNAMIC "Build only dynamic" OFF )
|
||||
|
||||
if( NOT (TESTS_BUILD_ONLY_DYNAMIC AND TESTS_BUILD_WITH_LOCAL_VULKAN_HPP) )
|
||||
find_package( Vulkan REQUIRED )
|
||||
endif()
|
||||
|
||||
if( MSVC )
|
||||
add_compile_options( /W4 /WX /permissive- )
|
||||
else()
|
||||
add_compile_options( -Wall -Wextra -pedantic -Werror )
|
||||
endif()
|
||||
|
||||
if( TESTS_BUILD_WITH_LOCAL_VULKAN_HPP )
|
||||
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/.." )
|
||||
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Headers/include" )
|
||||
else()
|
||||
include_directories( "${Vulkan_INCLUDE_DIRS}" )
|
||||
endif()
|
||||
|
||||
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../glm" )
|
||||
|
||||
add_subdirectory( ArrayProxy )
|
||||
add_subdirectory( ArrayProxyNoTemporaries )
|
||||
add_subdirectory( DesignatedInitializers )
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
if( NOT TESTS_BUILD_ONLY_DYNAMIC )
|
||||
if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
|
||||
vulkan_hpp__setup_test( NAME DesignatedInitializers CXX_STANDARD 20 )
|
||||
|
||||
set_target_properties( DesignatedInitializers PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( DesignatedInitializers PRIVATE utils )
|
||||
endif()
|
||||
@@ -12,13 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
if( NOT TESTS_BUILD_ONLY_DYNAMIC )
|
||||
vulkan_hpp__setup_test( NAME DeviceFunctions )
|
||||
|
||||
if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
|
||||
find_package( Vulkan REQUIRED )
|
||||
|
||||
set_target_properties( DeviceFunctions PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( DeviceFunctions PRIVATE utils ${Vulkan_LIBRARIES} )
|
||||
vulkan_hpp__setup_test( NAME DeviceFunctions LIBRARIES ${Vulkan_LIBRARIES} )
|
||||
endif()
|
||||
@@ -12,13 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
vulkan_hpp__setup_test( NAME DispatchLoaderDynamic )
|
||||
|
||||
if( UNIX )
|
||||
target_link_libraries( DispatchLoaderDynamic PRIVATE ${CMAKE_DL_LIBS} )
|
||||
endif()
|
||||
|
||||
set_target_properties( DispatchLoaderDynamic PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( DispatchLoaderDynamic PRIVATE utils )
|
||||
|
||||
@@ -12,15 +12,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
vulkan_hpp__setup_library(
|
||||
SHARED
|
||||
NAME DispatchLoaderDynamicSharedLibrary
|
||||
SOURCES DispatchLoaderDynamicSharedLibrary.cpp
|
||||
FOLDER "Tests" )
|
||||
|
||||
vulkan_hpp__setup_library( NAME DispatchLoaderDynamicSharedLibrary SHARED SOURCES DispatchLoaderDynamicSharedLibrary.cpp )
|
||||
|
||||
target_compile_definitions( DispatchLoaderDynamicSharedLibrary PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 VULKAN_HPP_STORAGE_SHARED VULKAN_HPP_STORAGE_SHARED_EXPORT )
|
||||
target_compile_definitions( DispatchLoaderDynamicSharedLibrary
|
||||
PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1
|
||||
VULKAN_HPP_STORAGE_SHARED VULKAN_HPP_STORAGE_SHARED_EXPORT )
|
||||
|
||||
if( UNIX )
|
||||
target_link_libraries( DispatchLoaderDynamicSharedLibrary PRIVATE ${CMAKE_DL_LIBS} )
|
||||
endif()
|
||||
|
||||
set_target_properties( DispatchLoaderDynamicSharedLibrary PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( DispatchLoaderDynamicSharedLibrary PRIVATE utils )
|
||||
|
||||
@@ -12,17 +12,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
vulkan_hpp__setup_test(
|
||||
NAME DispatchLoaderDynamicSharedLibraryClient
|
||||
LIBRARIES DispatchLoaderDynamicSharedLibrary )
|
||||
|
||||
vulkan_hpp__setup_test( NAME DispatchLoaderDynamicSharedLibraryClient )
|
||||
|
||||
target_compile_definitions( DispatchLoaderDynamicSharedLibraryClient PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 VULKAN_HPP_STORAGE_SHARED )
|
||||
|
||||
target_link_libraries( DispatchLoaderDynamicSharedLibraryClient PRIVATE DispatchLoaderDynamicSharedLibrary )
|
||||
target_compile_definitions( DispatchLoaderDynamicSharedLibraryClient
|
||||
PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1
|
||||
VULKAN_HPP_STORAGE_SHARED )
|
||||
|
||||
if( UNIX )
|
||||
target_link_libraries( DispatchLoaderDynamicSharedLibraryClient PRIVATE ${CMAKE_DL_LIBS} )
|
||||
endif()
|
||||
|
||||
set_target_properties( DispatchLoaderDynamicSharedLibraryClient PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( DispatchLoaderDynamicSharedLibraryClient PRIVATE utils )
|
||||
|
||||
@@ -12,17 +12,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
if( NOT TESTS_BUILD_ONLY_DYNAMIC )
|
||||
if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
|
||||
find_package( Vulkan REQUIRED )
|
||||
|
||||
vulkan_hpp__setup_test( NAME DispatchLoaderStatic )
|
||||
vulkan_hpp__setup_test(
|
||||
NAME DispatchLoaderStatic
|
||||
LIBRARIES ${Vulkan_LIBRARIES} )
|
||||
|
||||
if( UNIX )
|
||||
target_link_libraries( DispatchLoaderStatic PRIVATE ${CMAKE_DL_LIBS} )
|
||||
endif()
|
||||
|
||||
set_target_properties( DispatchLoaderStatic PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( DispatchLoaderStatic PRIVATE utils ${Vulkan_LIBRARIES} )
|
||||
endif()
|
||||
@@ -12,9 +12,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
vulkan_hpp__setup_test( NAME ExtensionInspection )
|
||||
|
||||
set_target_properties( ExtensionInspection PROPERTIES CXX_STANDARD 20 FOLDER "Tests" )
|
||||
target_link_libraries( ExtensionInspection PRIVATE utils )
|
||||
vulkan_hpp__setup_test( NAME ExtensionInspection CXX_STANDARD 20 )
|
||||
|
||||
@@ -12,9 +12,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
vulkan_hpp__setup_test( NAME Flags )
|
||||
|
||||
set_target_properties( Flags PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( Flags PRIVATE utils )
|
||||
|
||||
@@ -12,9 +12,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
vulkan_hpp__setup_test( NAME FormatTraits )
|
||||
|
||||
set_target_properties( FormatTraits PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( FormatTraits PRIVATE utils )
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
if( NOT TESTS_BUILD_ONLY_DYNAMIC )
|
||||
if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
|
||||
vulkan_hpp__setup_test( NAME Hash )
|
||||
|
||||
set_target_properties( Hash PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( Hash PRIVATE utils )
|
||||
endif()
|
||||
@@ -12,13 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
vulkan_hpp__setup_test( NAME NoExceptions )
|
||||
vulkan_hpp__setup_test( NAME NoExceptions LIBRARIES utils )
|
||||
|
||||
if( UNIX )
|
||||
target_link_libraries( NoExceptions PRIVATE ${CMAKE_DL_LIBS} )
|
||||
endif ()
|
||||
|
||||
set_target_properties( NoExceptions PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( NoExceptions PRIVATE utils )
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
if( NOT TESTS_BUILD_ONLY_DYNAMIC )
|
||||
if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
|
||||
vulkan_hpp__setup_test( NAME StridedArrayProxy )
|
||||
|
||||
set_target_properties( StridedArrayProxy PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( StridedArrayProxy PRIVATE utils )
|
||||
endif()
|
||||
@@ -12,13 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
vulkan_hpp__setup_test( NAME StructureChain )
|
||||
|
||||
if( UNIX )
|
||||
target_link_libraries( StructureChain PRIVATE ${CMAKE_DL_LIBS} )
|
||||
endif()
|
||||
|
||||
set_target_properties( StructureChain PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( StructureChain PRIVATE utils )
|
||||
|
||||
@@ -12,9 +12,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
vulkan_hpp__setup_test( NAME UniqueHandle )
|
||||
|
||||
set_target_properties( UniqueHandle PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( UniqueHandle PRIVATE utils )
|
||||
|
||||
@@ -12,13 +12,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
vulkan_hpp__setup_library( NAME UniqueHandleDefaultArguments SOURCES UniqueHandleDefaultArguments.cpp )
|
||||
vulkan_hpp__setup_library(
|
||||
NAME UniqueHandleDefaultArguments
|
||||
SOURCES UniqueHandleDefaultArguments.cpp
|
||||
FOLDER "Tests" )
|
||||
|
||||
if( UNIX )
|
||||
target_link_libraries( UniqueHandleDefaultArguments PRIVATE ${CMAKE_DL_LIBS} )
|
||||
endif()
|
||||
|
||||
set_target_properties( UniqueHandleDefaultArguments PROPERTIES FOLDER "Tests" )
|
||||
target_link_libraries( UniqueHandleDefaultArguments PRIVATE utils )
|
||||
|
||||
Reference in New Issue
Block a user