Instead, you might (depending on your use case), be better introducing your own version suffix / build-info variable, which is pretty easy to do and can be easily combined into the definitions your C++ code received, without any (C++) code changes needed (just some small tweaks to your cmake file/s). And it seems unusual that you'd want to include 32/64-bit build information there. The open-source build system generator to specify parameters. ]]Īnd modern cmake's will error if this format is not adhered to (older cmake's were more lenient, though presumably you can set some policy to relax it, it's still good to avoid deprecated functionality). Last week, I shared how to create a CMake project for Windows. To build a single target, switch to CMake Targets View in Solution Explorer. It's the same as running cmake -build -preset from the command line, where is the name of the active Build Preset.That said, I wonder why you want to do this? Can you tell use what's different in the two version files? From the docs, the project version isĬomposed of non-negative integer components, i.e. To build the entire project, select Build > Build All from the main menu. Here are relevant steps of my cmake file: set(CMAKE_C_COMPILER gcc) ![]() ![]() I do not want to have to edit it to tell the system I am building with 32-bit vs 64-bit. I would like the cmake file to be fully automated, e.g. I am using cmake to build a fairly large project in which I want to be able to compile using MinGW 64-bit vs MinGW 32-bit. Qt ver 5.15.13 for 32-bit compile and Qt 6.2.8 for 64-bit compile on Windows 10
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |