mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2026-02-05 22:35:49 +08:00
Add CMake version as workflow matrix parameter (#451)
* add CMake version as workflow matrix parameter * change system test behaviour based on specified CMake version * use explicit version strings * set CMake version for both test steps * exclude windows-2022, cmake 3.16 combination
This commit is contained in:
@@ -2,6 +2,11 @@ require_relative './lib'
|
||||
|
||||
class SystemWarnings < IntegrationTest
|
||||
|
||||
def setup
|
||||
# system is only supported for CMake >= 3.25
|
||||
@system_supported = (!ENV['CMAKE_VERSION']) || (Gem::Version.new(ENV['CMAKE_VERSION']) >= Gem::Version.new('3.25'))
|
||||
end
|
||||
|
||||
def test_dependency_added_using_system
|
||||
for use_system in [true, false] do
|
||||
prj = make_project name: use_system ? "system" : "no_system", from_template: 'using-adder'
|
||||
@@ -21,7 +26,7 @@ class SystemWarnings < IntegrationTest
|
||||
PACK
|
||||
|
||||
assert_success prj.configure
|
||||
if use_system
|
||||
if use_system and @system_supported
|
||||
assert_success prj.build
|
||||
else
|
||||
assert_failure prj.build
|
||||
@@ -42,7 +47,11 @@ class SystemWarnings < IntegrationTest
|
||||
PACK
|
||||
|
||||
assert_success prj.configure
|
||||
assert_success prj.build
|
||||
if @system_supported
|
||||
assert_success prj.build
|
||||
else
|
||||
assert_failure prj.build
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user