Comments (6)
The question is, do you want to include this 'hack' into corrosion?
I think it is reasonable to replace the $<CONFIG>
here in this case. I'll have a more detailed look on the weekend.
from corrosion.
Could you run cmake -S. -Bbuild --log-level=DEBUG
and paste the relevant logs from corrosion? I don't think this is related to cbindgen specifically though.
from corrosion.
Sure:
cmake -S. -Bbuild --log-level=DEBUG
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19045.
-- Version: 7.1.3
-- Build type:
-- CXX_STANDARD: 17
-- Required features: cxx_variadic_templates
-- Adding Boost library array
-- Enabling installation for 'array'
-- Adding Boost library assert
-- Enabling installation for 'assert'
-- Adding Boost library config
-- Enabling installation for 'config'
-- Adding Boost library container_hash
-- Enabling installation for 'container_hash'
-- Adding Boost library core
-- Enabling installation for 'core'
-- Adding Boost library detail
-- Enabling installation for 'detail'
-- Adding Boost library integer
-- Enabling installation for 'integer'
-- Adding Boost library predef
CMake Deprecation Warning at .../src/shared_interface/ext/boost_stacktrace/libs/predef/CMakeLists.txt:23 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Enabling installation for 'predef'
-- Adding Boost library preprocessor
-- boost_install: VERSION not given, assuming PROJECT_VERSION ('1.77.0')
-- Not enabling installation for 'preprocessor'; interface include directory '$<BUILD_INTERFACE:.../src/shared_interface/ext/boost_stacktrace/libs/preprocessor/include'
-- Adding Boost library stacktrace
-- Boost.Stacktrace: noop ON, backtrace OFF, addr2line OFF, basic ON, windbg ON, windbg_cached ON
-- Not enabling installation for 'stacktrace'; targets 'Boost::stacktrace' and 'boost_stacktrace' weren't found
-- Adding Boost library static_assert
-- Enabling installation for 'static_assert'
-- Adding Boost library throw_exception
-- Enabling installation for 'throw_exception'
-- Adding Boost library type_traits
-- Enabling installation for 'type_traits'
-- Adding Boost library winapi
-- Enabling installation for 'winapi'
CMake Deprecation Warning at .../src/shared_interface/ext/googletest/CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at .../src/shared_interface/ext/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at .../src/shared_interface/ext/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Including 'CMakeLists_sfun.txt' ...
-- Using Corrosion 0.4.99.99 with CMake 3.27.7 and the `Visual Studio 16 2019` Generator
-- Rust Toolchain: 1.70-x86_64-pc-windows-msvc
-- Rust toolchain 1.70-x86_64-pc-windows-msvc
-- Rust toolchain path C:\Users\user\.rustup\toolchains\1.70-x86_64-pc-windows-msvc
-- Rust Target: x86_64-pc-windows-msvc
-- Parsed Target triple: arch: x86_64, vendor: pc, OS: windows, env: msvc
-- Parsed Target triple: arch: x86_64, vendor: pc, OS: windows, env: msvc
-- Cargo target x86_64-pc-windows-msvc is an official target-triple
-- Installed targets: x86_64-pc-windows-msvc
-- Found 4 targets in package deep_filter
-- TARGET df produces byproducts df.lib;;
-- Found 1 targets in package DeepFilterLib
-- No relevant targets found in package DeepFilterLib - Ignoring
-- Found 1 targets in package DeepFilterDataLoader
-- No relevant targets found in package DeepFilterDataLoader - Ignoring
-- Found 1 targets in package deep-filter-ladspa
-- No relevant targets found in package deep-filter-ladspa - Ignoring
-- Found 2 targets in package df-demo
-- No relevant targets found in package df-demo - Ignoring
-- Corrosion created the following CMake targets: df;;;;
-- Using crate deep_filter as crate for cbindgen
-- rust target is df
-- Output directory property (target df): ARCHIVE_OUTPUT_DIRECTORY dir: ...path/to/repo/cpp/bin/$<CONFIG>
-- Setting IMPORTED_LOCATION_DEBUG for target df-static to `...path/to/repo/cpp/bin/$<CONFIG>/df.lib`.
-- Setting IMPORTED_LOCATION_RELEASE for target df-static to `...path/to/repo/cpp/bin/$<CONFIG>/df.lib`.
-- Setting IMPORTED_LOCATION_MINSIZEREL for target df-static to `...path/to/repo/cpp/bin/$<CONFIG>/df.lib`.
-- Setting IMPORTED_LOCATION_RELWITHDEBINFO for target df-static to `...path/to/repo/cpp/bin/$<CONFIG>/df.lib`.
-- Setting IMPORTED_LOCATION for target df-static to `...path/to/repo/cpp/bin/$<CONFIG>/df.lib`.
-- Adding command to copy byproducts `df.lib` to $<$<CONFIG:Debug>:...path/to/repo/cpp/bin/$<CONFIG>>/df.lib
-- Configuring done (7.9s)
-- Generating done (5.7s)
-- Build files have been written to: ...path/to/repo/cpp/build
from corrosion.
Did you manually set the variable ARCHIVE_OUTPUT_DIRECTORY
in your CMake code to path/to/repo/cpp/bin/$<CONFIG>
?
Edit: Could you try if this commit solves your issue: master...vs_config
from corrosion.
Indeed ARCHIVE_OUTPUT_DIRECTORY
is set somewhere in my build script
Output directory property (target df): ARCHIVE_OUTPUT_DIRECTORY dir:
path/to/repo/cpp/bin/$<CONFIG>
CMake Error at build/_deps/corrosion-src/cmake/Corrosion.cmake:182 (cmake_print_properties):
Unknown CMake command "cmake_print_properties".
Call Stack (most recent call first):
build/_deps/corrosion-src/cmake/Corrosion.cmake:226:EVAL:2 (_corrosion_set_imported_location_deferred)
sfunction/CMakeLists.txt:DEFERRED
Edit: include(CMakePrintHelpers)
fixes the error. The question is, do you want to include this 'hack' into corrosion? Otherwise, I will need to find a way to deal with this.
from corrosion.
Awesome, thanks!
from corrosion.
Related Issues (20)
- Multi configuration builds don't work HOT 2
- Investigate FOLDER property for targets HOT 2
- Relevant upstream Cmake issues for corrosion custom target name improvements
- [Question]: How to maintain order of libraries HOT 2
- Cross-Compiling Rust cdylibs with clang as the linker is likely broken HOT 1
- Cross-compiling with clang and (c)dylibs in the dependency graph is broken
- Support installing libraries HOT 4
- MacOS fat binaries support HOT 8
- CMake sometimes hangs after Cargo finishes a crate when using sccache HOT 5
- [Bug]: detecting native-static-libs on Windows with Rust 1.71 fails when linking crate from a workspace HOT 22
- Custom target support HOT 4
- Multi-crate setup: Recompiling shared dependencies HOT 4
- [Bug]: toxic `proc-macro2` version HOT 6
- `cargo rustc --crate-type` support HOT 8
- [Example Request]: How to integrate 2+ cxx crate HOT 2
- `corrosion_import_public_crate(CRATE_NAME "libc" VERSION "0.2")`-like feature / CMake-Crates.io integration? HOT 2
- [Bug]: Some crate requires AR_<triple> environment to cross-compile HOT 1
- [Bug]: Regression caused by passing AR? commit b72c8ceb52f5d0235ce0fc268cfeff20ce56e8d8? HOT 1
- Upstream Rust language support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corrosion.