-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
…he same name.
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
corrosion_tests_add_test(one_package_bin_and_lib "my_program") | ||
|
||
set_tests_properties("one_package_bin_and_lib_run_my_program" PROPERTIES PASS_REGULAR_EXPRESSION | ||
"^Ok\r?\n$" | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(test_project VERSION 0.1.0) | ||
include(../../test_header.cmake) | ||
|
||
corrosion_import_crate( | ||
MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Cargo.toml | ||
BIN_NAMESPACE bin LIB_NAMESPACE lib | ||
) | ||
|
||
if(NOT TARGET bin::mycrate) | ||
message(FATAL_ERROR "Unable to import bin::mycrate.") | ||
endif() | ||
|
||
add_executable(my_program main.cpp) | ||
target_link_libraries(my_program PUBLIC lib::mycrate) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "mycrate" | ||
version = "0.1.0" | ||
edition = "2018" | ||
description = "descr;\"hello\\" | ||
|
||
[lib] | ||
crate-type = ["staticlib", "rlib"] | ||
name = "mycrate" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include <iostream> | ||
int main() { | ||
std::cout << "Ok"; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub fn hello() { | ||
println!("Hello world"); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
use mycrate::hello; | ||
|
||
fn main() { | ||
hello(); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.