-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support custom Rust targets defined in a JSON file. Signed-off-by: Jonathan Schwender <[email protected]>
- Loading branch information
Showing
5 changed files
with
44 additions
and
1 deletion.
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,20 @@ | ||
# This test is supposed to ensure that the regex in _corrosion_parse_platform works as expected. | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
project(ParseTargetTriple LANGUAGES C) | ||
|
||
add_subdirectory(../../.. corrosion) | ||
|
||
|
||
# Important built-in target triples. | ||
_corrosion_parse_platform("Cargo.toml" "1.55" "x86_64-unknown-linux-gnu") | ||
_corrosion_parse_platform("Cargo.toml" "1.55" "aarch64-unknown-linux-gnu") | ||
_corrosion_parse_platform("Cargo.toml" "1.55" "aarch64-fuchsia") | ||
|
||
# Custom json file. The file doesn't need to exist for the test. | ||
_corrosion_parse_platform("Cargo.toml" "1.55" "../../blah/x86_64-unknown-custom-gnu.json") | ||
_corrosion_parse_platform("Cargo.toml" "1.55" "x86_64-unknown-custom-gnu.json") | ||
_corrosion_parse_platform("Cargo.toml" "1.55" "/path/to/x86_64-unknown-custom-gnu.json") | ||
_corrosion_parse_platform("Cargo.toml" "1.55" "../../blah/x86_64-custom_os.json") | ||
|
||
|
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 @@ | ||
# Pseudo manifest, just used in CMake to set some source file properties. |
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,10 @@ | ||
execute_process( | ||
COMMAND | ||
${CMAKE_COMMAND} ${CMAKE_CURRENT_LIST_DIR} | ||
COMMAND_ECHO STDOUT | ||
RESULT_VARIABLE SUCCESS | ||
) | ||
|
||
if (NOT SUCCESS EQUAL 0) | ||
message(FATAL_ERROR) | ||
endif() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.