-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat relative paths as relative to parent project's remote (#522)
* Treat relative paths as relative to parent project's remote * replace unit test case with integration test * run relative URL test only on supported CMake versions (3.27) * omit cmake 2.25.x test runner as replaced by 2.27.x --------- Co-authored-by: Chris Wright <[email protected]> Co-authored-by: Lars Melchior <[email protected]>
- Loading branch information
1 parent
a9c8c6f
commit 369f131
Showing
5 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.25.x' | ||
cmake-version: '3.27.x' | ||
|
||
- name: Install format dependencies | ||
run: pip3 install clang-format==14.0.6 cmake_format==0.6.11 pyyaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require_relative './lib' | ||
|
||
class RelativeURLs < IntegrationTest | ||
def setup | ||
# relative URLs were introduced in CMake 3.27 | ||
@relative_urls_supported = (!ENV['CMAKE_VERSION']) || (Gem::Version.new(ENV['CMAKE_VERSION']) >= Gem::Version.new('3.27')) | ||
end | ||
|
||
def test_add_project_with_relative_urls | ||
omit_if !@relative_urls_supported do | ||
prj = make_project from_template: 'using-fibadder' | ||
prj.create_lists_from_default_template package: 'CPMAddPackage("gh:cpm-cmake/[email protected]")' | ||
assert_success prj.configure | ||
assert_success prj.build | ||
end | ||
end | ||
end |