-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Build types #19
Comments
Hi ruslo, first of all cudos for this great project. A cmake documentation that provides a better overview and the greater picture of cmake is really needed. I am currently struggeling in my project with this topic so I just wanted to stop by and upvote this issue. I am confused about how things should be handled when using single config generators. Should in this case CMAKE_BUILD_TYPE be manually set? Should I use the config dependend properties like For example I observed that the imported targets of the Qt hunter package use the config ${suffix} for some properties, but not for others. The cmake documentation itself is very thin about the intent of these property names and when we should use which. Maybe you can shed some light on this when you find the time to work on this section. |
If you're using single-configuration generator you should use this variable on generating stage:
However your code should be designed to work with all types of generators, i.e. you should not check
Depends on the goal, I guess if you library name differs for different Release/Debug config, then you can modify |
Ok, good to know. But what can go wrong if I do not define So can I say that whenever there is a property that has a config neutral version, it is supposed to be the default value of that property and the config specific versions will override that value? |
Nothing, you will not have neither optimization nor debug flags. It's a valid build still though.
Default value can be set to cache I guess but note that it will not be used by multi-configuration generators: set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type")
I think if you match exactly then What is the exact case for you now? Why do you need to manipulate these properties? In most cases it's not needed. |
The text was updated successfully, but these errors were encountered: