Re: [CMake] setting a default build type
Brandon J. Van Every wrote: > On MSVC my CMakeLists.txt generates Debug, Release, MinSizeRel, and > RelWithDebInfo build types. I want to keep all 4 of 'em. I want to > select MinSizeRel as the default build, so that if an end user just > fires up BUILD_ALL and does nothing else, he'll get a MinSizeRel build. > The default default is "Debug" and that's not what I want. So, is there > a mechanism to specify the default build type? I was unable to deduce > it from the docs if there is one. Seems clear enough how to ship *one* > build type, I'd just do (SET CMAKE_BUILD_TYPE MinSizeRel). But I want > all 4 to be shipped. This would be a nice feature but I don't know how to implement it. Try generating a project and then manually editing the project files in such a way that the IDE selects a different configuration by default. Don't forget to remove the .suo and .ncb files between attempts because they store the user IDE state. -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Brandon J. Van Every wrote: So, is there a mechanism to specify the default build type? I think the .suo file stores this information which is not generated by CMake, actually. For now (as a workaround) you may want to add a batchfile to select a configuration with devenv command line parameters (/build /project /projetconfig etc.). Jan. -- Dipl.-Ing. Jan Woetzel -- Uni Kiel Institut f. Informatik und Praktische Mathematik Hermann-Rodewaldstr. 3 [Raum 310] 24098 Kiel/Germany -- Tel+49-431-880-4477 Fax+49-431-880-4845 Privat +49-431-802872 Mob. +49-179-2937346 -- Urlwww.mip.informatik.uni-kiel.de/~jw Email [EMAIL PROTECTED] Privat [EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
On 2006-09-07 00:56-0700 Brandon J. Van Every wrote: On MSVC my CMakeLists.txt generates Debug, Release, MinSizeRel, and RelWithDebInfo build types. I want to keep all 4 of 'em. I want to select MinSizeRel as the default build, so that if an end user just fires up BUILD_ALL and does nothing else, he'll get a MinSizeRel build. The default default is "Debug" and that's not what I want. So, is there a mechanism to specify the default build type? I was unable to deduce it from the docs if there is one. Seems clear enough how to ship *one* build type, I'd just do (SET CMAKE_BUILD_TYPE MinSizeRel). But I want all 4 to be shipped. Its a cached variable. So I think what you want is SET (CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "Flags used by the compiler during all build types.") That gives you the default you want plus the user should be able to override that default with a -D option or appropriate GUI action. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Alan W. Irwin wrote: Its a cached variable. So I think what you want is SET (CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "Flags used by the compiler No, Cmake (at least 2.4.2) is not generating any ".suo" file at all. Thus neither CMAKE_BUILD_TYPE nor CMAKE_CONFIGURATION_TYPES will help with teh default setting. Jan. -- Dipl.-Ing. Jan Woetzel -- Uni Kiel Institut f. Informatik und Praktische Mathematik Hermann-Rodewaldstr. 3 [Raum 310] 24098 Kiel/Germany -- Tel+49-431-880-4477 Fax+49-431-880-4845 Privat +49-431-802872 Mob. +49-179-2937346 -- Urlwww.mip.informatik.uni-kiel.de/~jw Email [EMAIL PROTECTED] Privat [EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Alan W. Irwin wrote: On 2006-09-07 00:56-0700 Brandon J. Van Every wrote: On MSVC my CMakeLists.txt generates Debug, Release, MinSizeRel, and RelWithDebInfo build types. I want to keep all 4 of 'em. I want to select MinSizeRel as the default build, so that if an end user just fires up BUILD_ALL and does nothing else, he'll get a MinSizeRel build. The default default is "Debug" and that's not what I want. So, is there a mechanism to specify the default build type? I was unable to deduce it from the docs if there is one. Seems clear enough how to ship *one* build type, I'd just do (SET CMAKE_BUILD_TYPE MinSizeRel). But I want all 4 to be shipped. Its a cached variable. So I think what you want is SET (CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "Flags used by the compiler during all build types.") That gives you the default you want plus the user should be able to override that default with a -D option or appropriate GUI action. I don't think this works for shipping 4 build types. I don't want them, by default, to all behave as the same build type. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Brad King wrote: Brandon J. Van Every wrote: On MSVC my CMakeLists.txt generates Debug, Release, MinSizeRel, and RelWithDebInfo build types. I want to keep all 4 of 'em. I want to select MinSizeRel as the default build, so that if an end user just fires up BUILD_ALL and does nothing else, he'll get a MinSizeRel build. The default default is "Debug" and that's not what I want. So, is there a mechanism to specify the default build type? I was unable to deduce it from the docs if there is one. Seems clear enough how to ship *one* build type, I'd just do (SET CMAKE_BUILD_TYPE MinSizeRel). But I want all 4 to be shipped. This would be a nice feature but I don't know how to implement it. Try generating a project and then manually editing the project files in such a way that the IDE selects a different configuration by default. Don't forget to remove the .suo and .ncb files between attempts because they store the user IDE state. That approach is not desired. People typically want CMakeList.txt under source control, not its end products, as the latter differ for every person. We don't ship .sln files to people, we tell them to install CMake. I'll make a feature request. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Brandon J. Van Every wrote: > Brad King wrote: >> This would be a nice feature but I don't know how to implement it. Try >> generating a project and then manually editing the project files in such >> a way that the IDE selects a different configuration by default. Don't >> forget to remove the .suo and .ncb files between attempts because they >> store the user IDE state. > > That approach is not desired. People typically want CMakeList.txt under > source control, not its end products, as the latter differ for every > person. We don't ship .sln files to people, we tell them to install CMake. I was not proposing this as a solution, I was asking you to figure out how to implement it. I have no idea how to write a .sln or .vcproj file that will convince the VS IDE to come up with a non-Debug configuration by default. I just tried manually reordering the configurations to put Release first and the IDE still selected Debug at startup. Even changing the Release configuration to have the name ARelease (which comes before Debug lexicographically) didn't fix it. -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
On 2006-09-07 09:35-0700 Brandon J. Van Every wrote: Alan W. Irwin wrote: On 2006-09-07 00:56-0700 Brandon J. Van Every wrote: On MSVC my CMakeLists.txt generates Debug, Release, MinSizeRel, and RelWithDebInfo build types. I want to keep all 4 of 'em. I want to select MinSizeRel as the default build, so that if an end user just fires up BUILD_ALL and does nothing else, he'll get a MinSizeRel build. The default default is "Debug" and that's not what I want. So, is there a mechanism to specify the default build type? I was unable to deduce it from the docs if there is one. Seems clear enough how to ship *one* build type, I'd just do (SET CMAKE_BUILD_TYPE MinSizeRel). But I want all 4 to be shipped. Its a cached variable. So I think what you want is SET (CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "Flags used by the compiler during all build types.") That gives you the default you want plus the user should be able to override that default with a -D option or appropriate GUI action. I don't think this works for shipping 4 build types. I don't want them, by default, to all behave as the same build type. Could you explain in more detail just what you mean by "shipping 4 build types"? (1) Is that giving the user the option of 4 different build types with a particular default? (2) Do you want to have the user build all 4 build types in the same CMake run? (3) Something else? The first interpretation of your request is easy to supply. CMake already allows the user to specify one of a list of build types. All the above SET command does is change the default build type (which is what you asked for) while still allowing the user to choose something different in ccmake (or whatever GUI front-end they use) if they prefer a build type that is different than the default MinSizeRel. If you want your users to build all 4 build types in the same CMake run, I don't quite see the point of that. So maybe there is a third interpretation of your request which I am missing? Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Brad King wrote: Brandon J. Van Every wrote: Brad King wrote: This would be a nice feature but I don't know how to implement it. Try generating a project and then manually editing the project files in such a way that the IDE selects a different configuration by default. Don't forget to remove the .suo and .ncb files between attempts because they store the user IDE state. That approach is not desired. People typically want CMakeList.txt under source control, not its end products, as the latter differ for every person. We don't ship .sln files to people, we tell them to install CMake. I was not proposing this as a solution, I was asking you to figure out how to implement it. I have no idea how to write a .sln or .vcproj file that will convince the VS IDE to come up with a non-Debug configuration by default. I just tried manually reordering the configurations to put Release first and the IDE still selected Debug at startup. Even changing the Release configuration to have the name ARelease (which comes before Debug lexicographically) didn't fix it. I have no idea either, nor time to investigate it at present. I will note our lack of knowledge in the feature request. Maybe we'll run into someone else who knows better. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Alan W. Irwin wrote: On 2006-09-07 09:35-0700 Brandon J. Van Every wrote: Alan W. Irwin wrote: On 2006-09-07 00:56-0700 Brandon J. Van Every wrote: On MSVC my CMakeLists.txt generates Debug, Release, MinSizeRel, and RelWithDebInfo build types. I want to keep all 4 of 'em. I want to select MinSizeRel as the default build, so that if an end user just fires up BUILD_ALL and does nothing else, he'll get a MinSizeRel build. The default default is "Debug" and that's not what I want. So, is there a mechanism to specify the default build type? I was unable to deduce it from the docs if there is one. Seems clear enough how to ship *one* build type, I'd just do (SET CMAKE_BUILD_TYPE MinSizeRel). But I want all 4 to be shipped. Its a cached variable. So I think what you want is SET (CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "Flags used by the compiler during all build types.") That gives you the default you want plus the user should be able to override that default with a -D option or appropriate GUI action. I don't think this works for shipping 4 build types. I don't want them, by default, to all behave as the same build type. Could you explain in more detail just what you mean by "shipping 4 build types"? (1) Is that giving the user the option of 4 different build types with a particular default? Yes. What currently comes out of CMake in VS7.1 is 4 different build types that the user can select, and the default is "Debug." If the user does nothing but run BUILD_ALL, she'll get a debug build. We'd rather it be a Release or MinSizeRel build. (2) Do you want to have the user build all 4 build types in the same CMake run? The user can enable this from VS7.1 if they want to. They would select "Batch Build." We're not interested in doing a batch build by default. The first interpretation of your request is easy to supply. CMake already allows the user to specify one of a list of build types. All the above SET command does is change the default build type (which is what you asked for) while still allowing the user to choose something different in ccmake (or whatever GUI front-end they use) if they prefer a build type that is different than the default MinSizeRel. Ok I will try it and report back. I'm in the middle of tearing something else up at this exact moment. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Given a very basic HelloWorld application in Visual Studio, there is only one way that I have found to force it to choose something other than "Debug" by default: eliminate the "Debug" configuration. In the very basic case (generated by Visual Studio wizard) there are only two configurations: Debug and Release. I've re-arranged the bits related to configuration in both the generated sln file and the vcproj file, to no avail. When there is no .suo file and Debug is one of the configurations, Visual Studio chooses it by default. Period. (As far as I can tell...) I have used the following: SET(CMAKE_CONFIGURATION_TYPES "MinSizeRel") to restrict the configurations to 1 and only 1. This works nicely for automated builds when you set the only config type you care about from a script... You could do the same, but then you lose the flexibility of just switching to Debug in the VS IDE... HTH, David Brandon J. Van Every wrote: Brad King wrote: Brandon J. Van Every wrote: Brad King wrote: This would be a nice feature but I don't know how to implement it. Try generating a project and then manually editing the project files in such a way that the IDE selects a different configuration by default. Don't forget to remove the .suo and .ncb files between attempts because they store the user IDE state. That approach is not desired. People typically want CMakeList.txt under source control, not its end products, as the latter differ for every person. We don't ship .sln files to people, we tell them to install CMake. I was not proposing this as a solution, I was asking you to figure out how to implement it. I have no idea how to write a .sln or .vcproj file that will convince the VS IDE to come up with a non-Debug configuration by default. I just tried manually reordering the configurations to put Release first and the IDE still selected Debug at startup. Even changing the Release configuration to have the name ARelease (which comes before Debug lexicographically) didn't fix it. I have no idea either, nor time to investigate it at present. I will note our lack of knowledge in the feature request. Maybe we'll run into someone else who knows better. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] setting a default build type
Hi, We are currently using MSBuild to select the build configuration. The command line looks like this: msbuild All.sln /property:Configuration="Release" /logger:FileLogger,Microsoft.Build.Engine;logfile="All.log" This line will build the ALL_BUILD target in release mode. (We tried to use VCBuild, but it's still buggy and doesn't parse the solution file properly.) You can do this in a batch file or a Perl script for all the builds you need. I'm currently working on a nightly build script for our shop which relies on CMake for generating the projects and uses MSBuild (or IncrediBuild) for compiling. So far the generation and build part are working perfectly. Cheers, Laurentiu -- Laurentiu Nicolae Senior Software Engineer Quintiq Tel: +31 (0)73 691 07 39 Fax: +31 (0)73 691 07 54 www.quintiq.com This message contains information that may be privileged or confidential and is the property of Quintiq. It is only intended for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you have received this message in error, please notify the sender immediately and delete all copies of this message. Please note that e-mails are susceptible to change, therefore they are not binding. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [Chicken-users] Re: [CMake] setting a default build type
felix winkelmann wrote: On 9/7/06, Brandon J. Van Every <[EMAIL PROTECTED]> wrote: On MSVC my CMakeLists.txt generates Debug, Release, MinSizeRel, and RelWithDebInfo build types. I want to keep all 4 of 'em. I want to select MinSizeRel as the default build, so that if an end user just fires up BUILD_ALL and does nothing else, he'll get a MinSizeRel build. The default default is "Debug" and that's not what I want. So, is there a mechanism to specify the default build type? I was unable to deduce it from the docs if there is one. Seems clear enough how to ship *one* build type, I'd just do (SET CMAKE_BUILD_TYPE MinSizeRel). But I want all 4 to be shipped. Just a side note, in case my misunderstanding of the build-type triggered an unneeded feature request: I'm fine with "Debug" being the default for Project builds (like MSVC/Project). It's in the "would be nice to have" level of importance. I would rather a user do nothing and get the best optimized build. I'm sure that's true for many other projects also. I asked Brandon to make MinSizeRel the default because I didn't get that this is only supported for mentioned builds. That is to say, only MSVC has Debug, Release, MinSizeRel, and RelWithDbgInfo builds at present. I believe there's an extant feature request about making these universal. Just overriding the CFLAGS via ccmake is fine for me. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake