Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the actual CMAKE_CXX_STANDARD provided by the workflow. #1750

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/ci-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ jobs:
strategy:
matrix:
build_type: [Debug, Release]
compiler:
- {cxx: "g++-9", c: "gcc-9"}
- {cxx: "g++-10", c: "gcc-10"}
- {cxx: "g++-11", c: "gcc-11"}
- {cxx: "clang++-13", c: "clang-13"}
- {cxx: "clang++-14", c: "clang-14"}
cxx_standard: [11, 14, 17, 20, 23]
compiler: [clang++-13, clang++-14, g++-9, g++-10, g++-11]
cxx_standard: [11, 14, 17, 20]
include:
- compiler: g++-11
cxx_standard: 23

steps:
- uses: actions/checkout@v4
Expand All @@ -42,8 +40,7 @@ jobs:
-DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON
-DVULKAN_HPP_TESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON
-DVULKAN_HPP_RUN_GENERATOR=ON
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}

Expand Down
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# 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
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 )
Expand Down Expand Up @@ -121,7 +125,6 @@ function( vulkan_hpp__setup_library )
vulkan_hpp__setup_platform( NAME ${TARGET_NAME} )
vulkan_hpp__setup_vulkan_include( 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 )
endif()
set_target_properties( ${TARGET_NAME} PROPERTIES FOLDER ${TARGET_FOLDER} )
Expand All @@ -145,7 +148,7 @@ function( vulkan_hpp__setup_sample )
vulkan_hpp__setup_vulkan_include( 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 )
set_target_properties( ${TARGET_NAME} PROPERTIES FOLDER "${TARGET_FOLDER}" )
Expand Down Expand Up @@ -252,7 +255,7 @@ function( vulkan_hpp__setup_test )
message( FATAL_ERROR "NAME must be defined in vulkan_hpp__setup_test" )
endif()
if( NOT TARGET_CXX_STANDARD )
set( TARGET_CXX_STANDARD 11 )
set( TARGET_CXX_STANDARD ${CMAKE_CXX_STANDARD} )
endif()

vulkan_hpp__setup_project( NAME ${TARGET_NAME} )
Expand Down
Loading