Comments (1)
Hi @solarispika
Thanks for your question, and thanks for your good research, including the merge request to CMake.
However, this experience led me to wonder if it is possible to assign CMAKE_FLAGS (instead of CMAKEFLAGS) in the CMakeToolchain when using a multi-config generator. There might be cases where users need common flags shared across build types, such as the -Werror flag.
This is a good point. The issue is that the current mechanisms don't have any way to model this, when defining something, from the the profile, command line, everything is tied to the current configuration, because there is no way to differentiate that. Things like tools.build:cxxflags
passed in a profile belong to the build_type/configuration
of that profile.
To be able to make them common to all configurations, we would need something like tools.build:cxx_flags_common
, but I'd say this looks a bit ugly.
Conan has mechanisms to share information, so if the same cxxflags
are to be used for multiple configurations, it can be reused in its own profile file, and include()
from other profiles wanting to use it. If CMake could handle that correctly, that would be the cleanest solution. My understanding is that in multi-config IDEs like VS, there is actually not a common set of flags in a common .props file, but just the same flags that are applied to the different configurations, repeating them.
from conan.
Related Issues (20)
- [question] Download Package via Python API HOT 7
- [question] How do I test for operating system with Conan 2 API? HOT 5
- [bug] profile include() does not work with os=Linux HOT 6
- [bug] cmake_lib template adds find_package to all requirements in test_package HOT 1
- [question] How to guarantee that a specific Android NDK is used for resolving packages HOT 15
- [question] `conanbuildinfo.cmake` replacement in Conan 2? HOT 3
- [bug] Conan Copy behavior Windows/Linux HOT 3
- [question] incremental upload HOT 13
- [bug] Docker runner issues with Docker Rancher
- [question] Unexpected behavior with `cli_args` passed to `CMake.configure()`. HOT 2
- [question] How to debug when different package IDs are generated HOT 1
- Cannot build boost/1.85.0 recipe with latest Visual Studio 2022 build tools (version 17.10) due to known issue with b2/4.10.1 HOT 16
- [bug] Login issue from different platforms HOT 6
- [question] Define custom layouts HOT 3
- [question] Conan + Meson + sysroot issue HOT 1
- Downloading and Install Single Conan Artifact in JFrog's Artifactory HOT 1
- [question] Remove option if having a dependency to a certain package HOT 2
- [question] Motivation behind conan v2 cache design HOT 1
- [question] CppInfo object when using components
- [question] How to compile C++ program for older version of MacOS? HOT 4
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 conan.