-
Notifications
You must be signed in to change notification settings - Fork 946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Unable to map additional imported locations #16175
Comments
Hi @sykhro Thanks for your report and specially for the reproducer. I am having a look. First quick feedback:
Please do not include toolchains from If I run the above steps in Windows, I get:
I am not sure why it works for you, maybe it is that in other OS, the build scripts of |
Thanks, noted. However, in my actual usecase, I remove many blocks from the toolchain and only keep the search paths.
Sorry, I forgot to mention, it needs
|
It may come as a surprise but so far the most random recipes from conan-center have built fine with this build_type and 0 changes required to the packages themselves. In my experience of porting to cursed platforms, building dependencies has never been this painless :) |
With
Yes, a bit surprising :) |
I guess that the error is related to your profile being MSVC? For my Windows config, I have |
Not really... ======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=MyBuildType
compiler=clang
compiler.version=16
os=Windows
[tool_requires]
*: ninja/[*]
[conf]
tools.build:compiler_executables={'cpp': 'clang++', 'c': 'clang', 'rc': 'clang'}
tools.cmake.cmaketoolchain:generator=Ninja Multi-Config
-------- Installing package fmt/10.2.1 (2 of 2) --------
fmt/10.2.1: Building from source
fmt/10.2.1: Package fmt/10.2.1:b55c038de9aa058b59f069fa5be24860b9ace96c
fmt/10.2.1: Copying sources to build folder
..
fmt/10.2.1: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
fmt/10.2.1: Calling build()
fmt/10.2.1: apply_conandata_patches(): No patches defined in conandata
fmt/10.2.1: Running CMake.configure()
fmt/10.2.1: RUN: cmake -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/memsharded/.conan2/p/b/fmtf7b8469784f80/p" -DFMT_DOC="OFF" -DFMT_TEST="OFF" -DFMT_INSTALL="ON" -DFMT_LIB_DIR="lib" -DFMT_OS="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\Users\memsharded\.conan2\p\b\fmtf7b8469784f80\b\src"
-- CMake version: 3.25.3
-- Using Conan toolchain: C:/Users/memsharded/.conan2/p/b/fmtf7b8469784f80/b/build/generators/conan_toolchain.cmake
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The CXX compiler identification is Clang 16.0.4 with GNU-like command-line
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/ws/LLVM/clang16/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 10.2.1
-- Build type: Release
-- Performing Test HAS_NULLPTR_WARNING
-- Performing Test HAS_NULLPTR_WARNING - Success
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/memsharded/.conan2/p/b/fmtf7b8469784f80/b/build
fmt/10.2.1: Running CMake.build()
fmt/10.2.1: RUN: cmake --build "C:\Users\memsharded\.conan2\p\b\fmtf7b8469784f80\b\build" --config MyBuildType -- -j8
ninja: error: loading 'build-MyBuildType.ninja': The system cannot find the file specified. Not sure what could I be missing here. |
It's most likely that |
Sure, passing a Now the command: cmake -B build -G "Ninja Multi-Config" -DCMAKE_CONFIGURATION_TYPES="MyBuildType;Release" && cmake --build build --config MyBuildType Fails, and this is expected, because it is not being passed the I am using Then, I tried to uncomment the line, and indeed it failed.
Then:
|
Oh, I had no idea this was possible. What's the meaning this syntax? Is it aliasing |
The This allows to explicitly define the intention: "the current project is a Debug project, but I want the dependencies built with |
Describe the bug
OS: Any
Conan version: 2.2.0
Using conan with a proprietary platform (
thePlatform
) that defines its own build types.For the purpose of this report, I will call it
MyBuildType
.MyBuildType
is akin toDebug
and there is a necessity to setMAP_IMPORTED_CONFIG_MYBUILDTYPE
toDebug
for any non-conan imported targets.For this, I use
set(CMAKE_MAP_IMPORTED_CONFIG_MYBUILDTYPE Debug)
.However, with that variable set, every single conan target starts screaming:
Note that, in the Conan profile for the platform,
build_type=MyBuildType
How to reproduce it
MyBuildType
to settings.ymlconan install . -s:h "build_type=MyBuildType" -d full_deploy --deployer-folder "$PWD/out" --output-folder "$PWD/out" --build=missing -g CMakeToolchain -g CMakeDeps
cmake -B build -G "Ninja Multi-Config" -DCMAKE_CONFIGURATION_TYPES="MyBuildType;Release" && cmake --build build --config MyBuildType
cmake --build build --config MyBuildType
reproducer.zip
The text was updated successfully, but these errors were encountered: