mirror of
https://github.com/Kitware/CMake.git
synced 2026-07-01 12:18:01 +00:00
Each Rust source file given to a target is considered a separate crate root. There's a concept of a "main crate root", which is the `.rs` file that is given to the final linker phase in CMake. Other Rust source file in a target are built as rlib separately. The project can still build `.rs` files into object files by setting the Rust_EMIT property on the desired source file.
7 lines
123 B
C++
7 lines
123 B
C++
#include <iostream>
|
|
|
|
extern "C" void cpp_shared_greet()
|
|
{
|
|
std::cout << "Hello from a C++ shader library" << std::endl;
|
|
}
|