forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case to verify identity cross builds
A build with a cross file should always be identified as a cross build, even if the host and build machine are identical. This was the case in 0.50, regressed in 0.51, and is fixed again in 0.52, so add a test case to ensure it doesn't regress again.
- Loading branch information
1 parent
bd42cb9
commit a1a8772
Showing
4 changed files
with
32 additions
and
0 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
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,5 @@ | ||
[host_machine] | ||
system = '@system@' | ||
cpu_family = '@cpu_family@' | ||
cpu = '@cpu@' | ||
endian = '@endian@' |
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,16 @@ | ||
project('crosstest') | ||
|
||
if get_option('generate') | ||
conf_data = configuration_data() | ||
conf_data.set('system', build_machine.system()) | ||
conf_data.set('cpu', build_machine.cpu()) | ||
conf_data.set('cpu_family', build_machine.cpu_family()) | ||
conf_data.set('endian', build_machine.endian()) | ||
|
||
configure_file(input: 'crossfile.in', | ||
output: 'crossfile', | ||
configuration: conf_data) | ||
message('Written cross file') | ||
else | ||
assert(meson.is_cross_build(), 'not setup as cross build') | ||
endif |
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 @@ | ||
option('generate', type : 'boolean', value : false) |