File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 4747 DEBIAN_FRONTEND : noninteractive
4848 NODE_PATH : /usr/lib/node_modules
4949 DOTNET_CLI_TELEMETRY_OPTOUT : ' true'
50- - name : Setup tmate session
51- uses : mxschmitt/action-tmate@v3
52- timeout-minutes : 30
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ add_dependencies(${target}
4747#
4848
4949add_test (NAME ${target}
50- COMMAND ${CMAKE_COMMAND} -E env CMAKE_BINARY_DIR =${CMAKE_BINARY_DIR} RUSTFLAGS=-Zmacro-backtrace ${Rust_CARGO_EXECUTABLE} test
50+ COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE} CMAKE_BINARY_DIR =${CMAKE_BINARY_DIR} RUSTFLAGS=-Zmacro-backtrace ${Rust_CARGO_EXECUTABLE} test
5151 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
5252)
5353
Original file line number Diff line number Diff line change @@ -3,8 +3,21 @@ fn main() {
33 // when running tests
44 if let Ok ( val) = env:: var ( "CMAKE_BINARY_DIR" ) {
55 println ! ( "cargo:rustc-link-search={val}" ) ;
6- // try to link the debug version when running tests
7- println ! ( "cargo:rustc-link-lib=metacalld" ) ;
6+
7+ match env:: var ( "CMAKE_BUILD_TYPE" ) {
8+ Ok ( val) => {
9+ if val == "Debug" {
10+ // try to link the debug version when running tests
11+ println ! ( "cargo:rustc-link-lib=metacalld" ) ;
12+ } else {
13+ println ! ( "cargo:rustc-link-lib=metacall" ) ;
14+ }
15+ }
16+ Err ( _) => {
17+ println ! ( "cargo:rustc-link-lib=metacall" ) ;
18+ }
19+ }
20+
821 println ! ( "cargo:rustc-env=LD_LIBRARY_PATH={val}" ) ;
922 println ! ( "cargo:rustc-env=CONFIGURATION_PATH={val}/configurations/global.json" )
1023 } else {
You can’t perform that action at this time.
0 commit comments