mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-25 05:20:04 +00:00
Use the actual CMAKE_CXX_STANDARD provided by the workflow. (#1750)
This commit is contained in:
parent
19dd76bcb4
commit
f67cfcc229
15
.github/workflows/ci-ubuntu.yml
vendored
15
.github/workflows/ci-ubuntu.yml
vendored
@ -12,13 +12,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
compiler:
|
compiler: [clang++-13, clang++-14, g++-9, g++-10, g++-11]
|
||||||
- {cxx: "g++-9", c: "gcc-9"}
|
cxx_standard: [11, 14, 17, 20]
|
||||||
- {cxx: "g++-10", c: "gcc-10"}
|
include:
|
||||||
- {cxx: "g++-11", c: "gcc-11"}
|
- compiler: g++-11
|
||||||
- {cxx: "clang++-13", c: "clang-13"}
|
cxx_standard: 23
|
||||||
- {cxx: "clang++-14", c: "clang-14"}
|
|
||||||
cxx_standard: [11, 14, 17, 20, 23]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -42,8 +40,7 @@ jobs:
|
|||||||
-DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON
|
-DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON
|
||||||
-DVULKAN_HPP_TESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON
|
-DVULKAN_HPP_TESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON
|
||||||
-DVULKAN_HPP_RUN_GENERATOR=ON
|
-DVULKAN_HPP_RUN_GENERATOR=ON
|
||||||
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
|
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
|
||||||
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
|
|
||||||
-DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}}
|
-DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}}
|
||||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
|
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
|
||||||
|
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
if ( NOT CMAKE_CXX_STANDARD )
|
||||||
|
set( CMAKE_CXX_STANDARD 11 )
|
||||||
|
endif()
|
||||||
|
|
||||||
# all the options for this project
|
# all the options for this project
|
||||||
option( VULKAN_HPP_PRECOMPILE "Precompile vulkan.hpp and vulkan_raii.hpp for sample builds" ON )
|
option( VULKAN_HPP_PRECOMPILE "Precompile vulkan.hpp and vulkan_raii.hpp for sample builds" ON )
|
||||||
option( VULKAN_HPP_RUN_GENERATOR "Run the HPP generator" OFF )
|
option( VULKAN_HPP_RUN_GENERATOR "Run the HPP generator" OFF )
|
||||||
@ -121,7 +125,6 @@ function( vulkan_hpp__setup_library )
|
|||||||
vulkan_hpp__setup_platform( NAME ${TARGET_NAME} )
|
vulkan_hpp__setup_platform( NAME ${TARGET_NAME} )
|
||||||
vulkan_hpp__setup_vulkan_include( NAME ${TARGET_NAME} )
|
vulkan_hpp__setup_vulkan_include( NAME ${TARGET_NAME} )
|
||||||
vulkan_hpp__setup_warning_level( NAME ${TARGET_NAME} )
|
vulkan_hpp__setup_warning_level( NAME ${TARGET_NAME} )
|
||||||
set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD 11 )
|
|
||||||
set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON )
|
set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON )
|
||||||
endif()
|
endif()
|
||||||
set_target_properties( ${TARGET_NAME} PROPERTIES FOLDER ${TARGET_FOLDER} )
|
set_target_properties( ${TARGET_NAME} PROPERTIES FOLDER ${TARGET_FOLDER} )
|
||||||
@ -145,7 +148,7 @@ function( vulkan_hpp__setup_sample )
|
|||||||
vulkan_hpp__setup_vulkan_include( NAME ${TARGET_NAME} )
|
vulkan_hpp__setup_vulkan_include( NAME ${TARGET_NAME} )
|
||||||
vulkan_hpp__setup_warning_level( NAME ${TARGET_NAME} )
|
vulkan_hpp__setup_warning_level( NAME ${TARGET_NAME} )
|
||||||
|
|
||||||
set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON )
|
set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON )
|
||||||
|
|
||||||
if( TARGET_FOLDER )
|
if( TARGET_FOLDER )
|
||||||
set_target_properties( ${TARGET_NAME} PROPERTIES FOLDER "${TARGET_FOLDER}" )
|
set_target_properties( ${TARGET_NAME} PROPERTIES FOLDER "${TARGET_FOLDER}" )
|
||||||
@ -252,7 +255,7 @@ function( vulkan_hpp__setup_test )
|
|||||||
message( FATAL_ERROR "NAME must be defined in vulkan_hpp__setup_test" )
|
message( FATAL_ERROR "NAME must be defined in vulkan_hpp__setup_test" )
|
||||||
endif()
|
endif()
|
||||||
if( NOT TARGET_CXX_STANDARD )
|
if( NOT TARGET_CXX_STANDARD )
|
||||||
set( TARGET_CXX_STANDARD 11 )
|
set( TARGET_CXX_STANDARD ${CMAKE_CXX_STANDARD} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vulkan_hpp__setup_project( NAME ${TARGET_NAME} )
|
vulkan_hpp__setup_project( NAME ${TARGET_NAME} )
|
||||||
|
Loading…
Reference in New Issue
Block a user