cmake generator produces invalid conanbuildinfo.cmake when there are multiple CPPFLAGS
See original GitHub issueI have a package (GoogleTest) that is passing more than one flag to its consumers via cpp_info.cppflags
. In the generated conanbuildinfo.cmake, the line set(CONAN_CXX_FLAGS_GOOGLETEST "-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LINKED_AS_SHARED_LIBRARY=1")
causes CMake to issue a compilation command of the form:
/longest_path/c++ -isystem /longer_path/include -stdlib=libc++ -O3 -DNDEBUG -fPIE "-Wall -Werror -DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LINKED_AS_SHARED_LIBRARY=1" -std=c++11 -o CMakeFiles/main.dir/main.cpp.o -c /long_path/main.cpp
It looks like the CMakeFiles/main.dir/flags.make file contains:
CXX_FLAGS = -stdlib=libc++ -O3 -DNDEBUG -fPIE "-Wall -Werror -DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LINKED_AS_SHARED_LIBRARY=1" -std=c++11
I believe the fix is to remove the double quotes from the generated CMake set
command.
Issue Analytics
- State:
- Created 7 years ago
- Comments:22 (14 by maintainers)
Top Results From Across the Web
conan Documentation
They do not build nor create the packages. ... This generator creates a conanbuildinfo.cmake file that defines CMake variables including.
Read more >cmake-generator-expressions(7)
Generator expressions are evaluated during build system generation to produce information specific to each build configuration. They have the form $<...> .
Read more >Cmake deps conan
Many developer SDKs and libraries set their own environment variables . ... A conan generator to make python dependencies available to cmake CMake...
Read more >Using Conan and cross-compile to EV3
The generators could be for example cmake,make,visual studio,scons,qmake and many more, there is even a markdown generator that generates ...
Read more >conan Changelog - pyup.io
Fix: CMakeDeps now generates CMake variables as `XXX_INCLUDE_DIR` in the ... Bugfix: Fix case where CMakeDeps generator may use the wrong dependency name ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Acknowledged, revert it and fix everybody else. When (or if) I reproduce it again I’ll provide functioning code.
Excellent! Thanks to you for reporting, tracking and testing.