Skip to content
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

conan_cmake_run(SETTINGS compiler.libcxx=libstdc++11) causes setting to be passed twice #255

Closed
smessmer opened this issue Jun 29, 2020 · 1 comment · Fixed by #258
Closed

Comments

@smessmer
Copy link
Contributor

smessmer commented Jun 29, 2020

I use the following lines to invoke conan:

conan_cmake_run(
       CONANFILE conanfile.py
       BUILD all
       SETTINGS compiler.libcxx=libstdc++11)

However, looking at the build output, I see

-- Conan executing: /usr/local/bin/conan install /root/cryfs/conanfile.py -s build_type=RelWithDebInfo -s compiler=gcc -s compiler.version=7 -s compiler.libcxx=libstdc++ -s compiler.libcxx=libstdc++11 -g=cmake --build

It seems, it just adds the compiler.libcxx=libstdc++11 but still emits the compiler.libcxx=libstdc++ and passes both to conan install.

Now it seems that in my case, this does the right thing and sets up the build to use libstdc++11, but this seems fishy nevertheless and I'm not sure if I can rely on that behavior.

@czoido
Copy link
Contributor

czoido commented Jun 30, 2020

Hi @smessmer,

Thanks a lot for reporting. Yes, it seems like the autodetection of libcxx is run regardless of the arguments provided and for this case the SETTINGS defined in conan_cmake_run should take preference.
I'll add this fix for the next release.

@czoido czoido added this to the 0.16 milestone Jun 30, 2020
smessmer added a commit to cryfs/cryfs that referenced this issue Jul 1, 2020
…b4e22b3ae4): Make "SETTINGS compiler.libcxx=libstdc++11" do the right thing (see conan-io/cmake-conan#255)
@czoido czoido removed this from the 0.16 milestone Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants