For example, if $(Version) is 1.2.3-beta.4, then the value would be 1.2.3. AssemblyVersion and FileVersion default to the value of $(Version) without the suffix. The default version number is 1.0.0.0 and you can specify additional version numbers on the command line, mimicking SDK-behaviour: You can add additional attributes if needed. So I finally arrived on the following target that is shared by the whole solution through : Using the property name AssemblyAttributes causes the target of GenerateAssemblyInfo from AspNetCompileMerge.targets to be executed and failing. Further we also use AspNetCompileMerge for pre-compiling ASP.NET MVC 5 views. We have a solution containing a mix of SDK and non-SDK projects. The top answer is great, but I needed to make a few adjustments. This will set it to 1.0.0.0 if Version wasn't specified in the command line. To overcome this, I suggest defining the default Version value in your. Update : Michael Parker has pointed out that if you use this approach and do a build from Visual Studio, you end up with an empty version in the Version.cs file. Just make sure you remove the existing AssemblyVersion attribute because it will now be generated during build. targets and extension packs, because MSBuild already has a nice built-in task which does most of the stuff: If you use the old project format, you need to add the following BeforeBuild step to your. For example, to make qb always build as a dynamic library with the name libfoo, you would put this in qb.For SDK-style projects that are built using dotnet.exe, assembly version attributes are generated automatically, so you can use /p:Version=5.4.3.0 right out of the box. Values not defined in the file will remain as their defaults. The configuration file works the same as the command line options, except they are in a toml file. This is handy if you build a lot but don't want to pass the command line options every time. It's possible to create a qb.toml file (in the folder you're running qb) to specify your configuration options as well. For example, to define FOO and BAR in the preprocessor when compiling, you would run qb -define FOO -define BAR. For example, to add the folders foo and bar to the include path, you would run qb -include foo -include bar. includeĪdds a directory to the include path. For example, when building with qb -debug, you will get an unoptimized binary, but by building without any options (by just running qb) it will produce an optimized build. When this option is set to default, whether the binary will be optimized is defined by whether it's a debug build or not. Can either be default, none, size, or speed. When it's minimal or min, the minimal amount of exception handling will be done, which is similar to all, but there is no stack unwinding. This only makes a difference on Windows, where setting this to all will allow the runtime to catch certain access violation and other exceptions. Can either be standard ( std), all, or minimal ( min). Sets the way that the compiler's runtime will handle exceptions. Makes the compiler more strict with its warnings. Makes it so that all compiler and linker commands will be printed to the log. pdb file, on Linux that means embedding debug information into the binary itself so that it can be used with gdb, and on Mac that means a. Produces debug information for the resulting binary. Links statically in order to create a standalone binary that does not perform any loading of dynamic libraries. Then conanbuildfile.txt is used to properly compile & link to any dependencies in the Conanfile. (unless conanbuildfile.txt already exists). If a conanfile.txt exists, it will run conan install. Nothing else yet, but the following is planned: global configuration (like local, but system-wide), and vcpkg (for Windows).įor example, to link with SFML, we can add -pkg sfml, as long as sfml can be resolved by one of the package sources.Īdditionally, if Conan is installed, it may be used as a way to manage packages.pkgconfig: If you have pkg-config installed on your system, it will be checking for packages from there.Local configuration: If you have a qb.toml file, this will check for packages defined there.Listed here are the sources, in the order that they will be searched for: qb will try to resolve the package by itself, using a variety of sources. pkgĪdds a package to link to by its name. This is specified using the keywords exe, dll, or lib.įor example, to create a dynamic library, you would pass -type dll. Sets the type of the project, which can be an executable or a (dynamic) library. If no name is passed, the name of the current directory will be used.įor example, -name foo will produce a binary foo on Linux, and foo.exe on Windows. You should not provide any file extension here as it will be added automatically. Sets the name of the project and controls the output filename.
0 Comments
Leave a Reply. |