diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 79e206a..59681fa 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -36,7 +36,6 @@ jobs: -DVULKAN_HPP_SAMPLES_BUILD=ON \ -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ -DVULKAN_HPP_TESTS_BUILD=ON \ - -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ -DVULKAN_HPP_PRECOMPILE=OFF \ -DVULKAN_HPP_RUN_GENERATOR=ON \ diff --git a/.github/workflows/ci-ubuntu-22.yml b/.github/workflows/ci-ubuntu-22.yml index 577cea3..56fa17b 100644 --- a/.github/workflows/ci-ubuntu-22.yml +++ b/.github/workflows/ci-ubuntu-22.yml @@ -41,7 +41,6 @@ jobs: -DVULKAN_HPP_SAMPLES_BUILD=ON \ -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ -DVULKAN_HPP_TESTS_BUILD=ON \ - -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ -DVULKAN_HPP_PRECOMPILE=OFF \ -DVULKAN_HPP_RUN_GENERATOR=ON \ diff --git a/.github/workflows/ci-ubuntu-24.yml b/.github/workflows/ci-ubuntu-24.yml index 4ac039e..6614436 100644 --- a/.github/workflows/ci-ubuntu-24.yml +++ b/.github/workflows/ci-ubuntu-24.yml @@ -42,7 +42,6 @@ jobs: -DVULKAN_HPP_SAMPLES_BUILD=ON \ -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ -DVULKAN_HPP_TESTS_BUILD=ON \ - -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ -DVULKAN_HPP_ENABLE_CPP20_MODULES=$modules_flag \ -DVULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \ -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 63f69b2..dda07eb 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -37,7 +37,6 @@ jobs: -DVULKAN_HPP_SAMPLES_BUILD=ON \ -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ -DVULKAN_HPP_TESTS_BUILD=ON \ - -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ -DVULKAN_HPP_ENABLE_CPP20_MODULES=$modules_flag \ -DVULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \ -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 43f7990..4e84840 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,6 @@ option( VULKAN_HPP_GENERATOR_BUILD "Build the HPP generator" ${PROJECT_IS_TOP_LE option( VULKAN_HPP_SAMPLES_BUILD "Build samples" OFF ) option( VULKAN_HPP_TESTS_BUILD "Build tests" OFF ) option( VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC "Build only dynamic. Required in case the Vulkan SDK is not available" OFF ) -option( VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC "Build only dynamic" OFF ) option( VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON ) option( VULKAN_HPP_ENABLE_CPP20_MODULES "Build Vulkan-Hpp as C++20 module; requires minimum CMake version 3.28" OFF ) option( VULKAN_HPP_ENABLE_STD_MODULE "Build Vulkan-Hpp with import std; requires minimum CMake version 3.30" OFF ) @@ -530,7 +529,7 @@ function( vulkan_hpp__setup_test ) set( multiValueArgs LIBRARIES ) cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) - if( NOT (VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC AND VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP) ) + if( NOT VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP ) find_package( Vulkan REQUIRED ) endif() diff --git a/tests/ArrayProxy/CMakeLists.txt b/tests/ArrayProxy/CMakeLists.txt index d3e957b..caf06ac 100644 --- a/tests/ArrayProxy/CMakeLists.txt +++ b/tests/ArrayProxy/CMakeLists.txt @@ -12,6 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - vulkan_hpp__setup_test( NAME ArrayProxy ) -endif() \ No newline at end of file +vulkan_hpp__setup_test( NAME ArrayProxy ) diff --git a/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp b/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp index cb75944..744b244 100644 --- a/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp +++ b/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp @@ -69,16 +69,6 @@ std::vector const getConstVector() return { 1, 2 }; } -std::initializer_list getInitializerList() -{ - return { 1, 2 }; -} - -std::initializer_list const getConstInitializerList() -{ - return { 1, 2 }; -} - int main( int /*argc*/, char ** /*argv*/ ) { try @@ -233,50 +223,10 @@ int main( int /*argc*/, char ** /*argv*/ ) // fct( { a, b } ); // not supported: cannot convert argument 1 from 'initializer list' to 'vk::ArrayProxyNoTemporaries' // fctc( { a, b } ); // not supported: cannot convert argument 1 from 'initializer list' to 'vk::ArrayProxyNoTemporaries' - auto il0 = { 0, 1 }; // -> std::initializer_list - // fct( il0 ); // not supported: cannot convert from 'const int *' to 'int *' - fctc( il0 ); - - std::initializer_list il1 = { 0, 1 }; - // fct( il1 ); // not supported: cannot convert argument 1 from 'std::initializer_list<_Ty>' to 'vk::ArrayProxyNoTemporaries' - fctc( il1 ); - - std::initializer_list il2 = { 0, 1 }; - // fct( il2 ); // not supported: cannot convert argument 1 from 'std::initializer_list' to 'vk::ArrayProxyNoTemporaries' - fctc( il2 ); - - std::initializer_list const il3 = { 0, 1 }; - // fct( il3 ); // not supported: cannot convert argument 1 from 'const std::initializer_list<_Ty>' to 'vk::ArrayProxyNoTemporaries' - fctc( il3 ); - - std::initializer_list const il4 = { 0, 1 }; - // fct( il4 ); // not supported: cannot convert argument 1 from 'const std::initializer_list' to 'vk::ArrayProxyNoTemporaries' - fctc( il4 ); - - // getInitializerList - // fct( getConstInitializerList() ); // not supported: cannot convert argument 1 from 'const std::initializer_list<_Ty>' to 'vk::ArrayProxyNoTemporaries' - // fctc( getConstInitializerList() ); // not supported: cannot convert argument 1 from 'const std::initializer_list<_Ty>' to 'vk::ArrayProxyNoTemporaries' - // fct( getInitializerList() ); // not supported: cannot convert argument 1 from 'std::initializer_list<_Ty>' to 'vk::ArrayProxyNoTemporaries' - // fctc( getInitializerList() ); // not supported: cannot convert argument 1 from 'std::initializer_list<_Ty>' to 'vk::ArrayProxyNoTemporaries' - - // vk::ArrayProxyNoTemporaries apnt22 = il1; // not supported: cannot convert from 'std::initializer_list<_Ty>' to 'vk::ArrayProxyNoTemporaries' - // vk::ArrayProxyNoTemporaries apnt23 = il2; // not supported: cannot convert from 'std::initializer_list' to 'vk::ArrayProxyNoTemporaries' - // vk::ArrayProxyNoTemporaries apnt24 = il3; // not supported: cannot convert from 'const std::initializer_list<_Ty>' to 'vk::ArrayProxyNoTemporaries' - // vk::ArrayProxyNoTemporaries apnt25 = il4; // not supported: cannot convert from 'const std::initializer_list' to 'vk::ArrayProxyNoTemporaries' - - vk::ArrayProxyNoTemporaries apnt26 = {}; - assert( apnt26.size() == 0 ); + vk::ArrayProxyNoTemporaries apnt22 = {}; + assert( apnt22.size() == 0 ); // vk::ArrayProxyNoTemporaries apnt27 = { 0, 1 }; // not supported: cannot convert from 'initializer list' to 'vk::ArrayProxyNoTemporaries' - - vk::ArrayProxyNoTemporaries apnt28 = il1; - assert( apnt28.size() == 2 ); - vk::ArrayProxyNoTemporaries apnt29 = il2; - assert( apnt29.size() == 2 ); - vk::ArrayProxyNoTemporaries apnt30 = il3; - assert( apnt30.size() == 2 ); - vk::ArrayProxyNoTemporaries apnt31 = il4; - assert( apnt31.size() == 2 ); } catch ( vk::SystemError const & err ) { diff --git a/tests/ArrayProxyNoTemporaries/CMakeLists.txt b/tests/ArrayProxyNoTemporaries/CMakeLists.txt index 1014e39..c1a584b 100644 --- a/tests/ArrayProxyNoTemporaries/CMakeLists.txt +++ b/tests/ArrayProxyNoTemporaries/CMakeLists.txt @@ -12,6 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - vulkan_hpp__setup_test( NAME ArrayProxyNoTemporaries NO_UTILS ) -endif() \ No newline at end of file +vulkan_hpp__setup_test( NAME ArrayProxyNoTemporaries NO_UTILS ) diff --git a/tests/ArrayWrapper/CMakeLists.txt b/tests/ArrayWrapper/CMakeLists.txt index 843b6ba..a29f302 100644 --- a/tests/ArrayWrapper/CMakeLists.txt +++ b/tests/ArrayWrapper/CMakeLists.txt @@ -12,6 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - vulkan_hpp__setup_test( NAME ArrayWrapper ) -endif() \ No newline at end of file +vulkan_hpp__setup_test( NAME ArrayWrapper ) diff --git a/tests/CppType/CMakeLists.txt b/tests/CppType/CMakeLists.txt index 039911d..137787b 100644 --- a/tests/CppType/CMakeLists.txt +++ b/tests/CppType/CMakeLists.txt @@ -12,6 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - vulkan_hpp__setup_test( NAME CppType ) -endif() \ No newline at end of file +vulkan_hpp__setup_test( NAME CppType ) diff --git a/tests/DesignatedInitializers/CMakeLists.txt b/tests/DesignatedInitializers/CMakeLists.txt index d17a3a1..4cadb8c 100644 --- a/tests/DesignatedInitializers/CMakeLists.txt +++ b/tests/DesignatedInitializers/CMakeLists.txt @@ -12,6 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - vulkan_hpp__setup_test( NAME DesignatedInitializers CXX_STANDARD 20 ) -endif() \ No newline at end of file +vulkan_hpp__setup_test( NAME DesignatedInitializers CXX_STANDARD 20 ) diff --git a/tests/DeviceFunctions/CMakeLists.txt b/tests/DeviceFunctions/CMakeLists.txt index 2bb914d..67c8b75 100644 --- a/tests/DeviceFunctions/CMakeLists.txt +++ b/tests/DeviceFunctions/CMakeLists.txt @@ -12,8 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - find_package( Vulkan REQUIRED ) - +find_package( Vulkan QUIET ) +if ( Vulkan_FOUND ) vulkan_hpp__setup_test( NAME DeviceFunctions LIBRARIES ${Vulkan_LIBRARIES} ) -endif() \ No newline at end of file +endif() diff --git a/tests/DispatchLoaderStatic/CMakeLists.txt b/tests/DispatchLoaderStatic/CMakeLists.txt index 9039002..4c54314 100644 --- a/tests/DispatchLoaderStatic/CMakeLists.txt +++ b/tests/DispatchLoaderStatic/CMakeLists.txt @@ -12,14 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - find_package( Vulkan REQUIRED ) - - vulkan_hpp__setup_test( - NAME DispatchLoaderStatic - LIBRARIES ${Vulkan_LIBRARIES} ) +find_package( Vulkan QUIET ) +if ( Vulkan_FOUND ) + vulkan_hpp__setup_test( NAME DispatchLoaderStatic LIBRARIES ${Vulkan_LIBRARIES} ) if( UNIX ) target_link_libraries( DispatchLoaderStatic PRIVATE ${CMAKE_DL_LIBS} ) endif() -endif() \ No newline at end of file +endif() diff --git a/tests/EnableBetaExtensions/EnableBetaExtensions.cpp b/tests/EnableBetaExtensions/EnableBetaExtensions.cpp index a041c8b..eae0d27 100644 --- a/tests/EnableBetaExtensions/EnableBetaExtensions.cpp +++ b/tests/EnableBetaExtensions/EnableBetaExtensions.cpp @@ -15,16 +15,24 @@ // VulkanHpp Tests : EnableBetaExtensions // Compile test with VK_ENABLE_BETA_EXTENSIONS defined +// ignore warning 4189: local variable is initialized but not referenced +#if defined( _MSC_VER ) +# pragma warning( disable : 4189 ) +#elif defined( __GNUC__ ) +# pragma GCC diagnostic ignored "-Wunused-but-set-variable" +# pragma GCC diagnostic ignored "-Wunused-variable" +#else +// unknow compiler... just ignore the warnings for yourselves ;) +#endif + #define VK_ENABLE_BETA_EXTENSIONS #include int main( int /*argc*/, char ** /*argv*/ ) { - vk::Device device; + vk::PhysicalDevice physicalDevice; - vk::VideoEncodeSessionParametersGetInfoKHR videoSessionParametersInfo; - auto stuff = device.getEncodedVideoSessionParametersKHR( videoSessionParametersInfo ); + auto features = physicalDevice.getFeatures2(); + auto properties = physicalDevice.getProperties2(); return 0; } diff --git a/tests/Handles/CMakeLists.txt b/tests/Handles/CMakeLists.txt index 57a5796..5aeb8b0 100644 --- a/tests/Handles/CMakeLists.txt +++ b/tests/Handles/CMakeLists.txt @@ -12,8 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - find_package( Vulkan REQUIRED ) - +find_package( Vulkan QUIET ) +if ( Vulkan_FOUND ) vulkan_hpp__setup_test( NAME Handles LIBRARIES ${Vulkan_LIBRARIES} ) -endif() \ No newline at end of file +endif() diff --git a/tests/Handles/Handles.cpp b/tests/Handles/Handles.cpp index 650f98d..92c3fbf 100644 --- a/tests/Handles/Handles.cpp +++ b/tests/Handles/Handles.cpp @@ -62,12 +62,6 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "hoho"; } - vk::PhysicalDevice physicalDevice; - if (physicalDevice == instance ) - { - std::cout << "hoho"; - } - instance.destroy(); instance2.destroy(); diff --git a/tests/HandlesMoveExchange/CMakeLists.txt b/tests/HandlesMoveExchange/CMakeLists.txt index fdfdee5..a52ddae 100644 --- a/tests/HandlesMoveExchange/CMakeLists.txt +++ b/tests/HandlesMoveExchange/CMakeLists.txt @@ -12,8 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - find_package( Vulkan REQUIRED ) - +find_package( Vulkan QUIET ) +if ( Vulkan_FOUND ) vulkan_hpp__setup_test( NAME HandlesMoveExchange LIBRARIES ${Vulkan_LIBRARIES} ) endif() diff --git a/tests/Hash/CMakeLists.txt b/tests/Hash/CMakeLists.txt index 53e26c7..34cba51 100644 --- a/tests/Hash/CMakeLists.txt +++ b/tests/Hash/CMakeLists.txt @@ -12,6 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - vulkan_hpp__setup_test( NAME Hash ) -endif() \ No newline at end of file +vulkan_hpp__setup_test( NAME Hash ) diff --git a/tests/StridedArrayProxy/CMakeLists.txt b/tests/StridedArrayProxy/CMakeLists.txt index e5e7018..cb83be6 100644 --- a/tests/StridedArrayProxy/CMakeLists.txt +++ b/tests/StridedArrayProxy/CMakeLists.txt @@ -12,6 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC ) - vulkan_hpp__setup_test( NAME StridedArrayProxy ) -endif() \ No newline at end of file +vulkan_hpp__setup_test( NAME StridedArrayProxy ) diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index e208b24..91d79ad 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -472,7 +472,7 @@ namespace VULKAN_HPP_NAMESPACE typename std::enable_if().begin() ), T *>::value && std::is_convertible().size() ), std::size_t>::value && std::is_lvalue_reference::value, int>::type = 0> - ArrayProxyNoTemporaries( V && v ) VULKAN_HPP_NOEXCEPT + ArrayProxyNoTemporaries( V & v ) VULKAN_HPP_NOEXCEPT : m_count( static_cast( v.size() ) ) , m_ptr( v.begin() ) {