[CMake] Beginning to compiling CMake file

CrestChristopher crestchristopher at gmail.com
Thu Aug 2 09:07:26 EDT 2018


How can I verify whether what I want to built claims support for Windows ?


On 8/1/2018 11:15 AM, Michael Ellery wrote:
> So it sounds like you are on windows. First, be sure that the project that you are building claims support for windows. Windows is still the “odd man out” platform in many cases, so you don’t want to chase your tail with a project that never claimed windows support in the first place. That said, assuming windows is a supported build env, then it further sounds like you are using cmake-gui.
>
> The most sensible generator is one of the visual studio ones - 64 or 32 bit depending on your needs. Once you have generated a project with cmake, you then open that generated project with VS.
>
> Alternatively, however, I’d also suggest you consider just using the built-in CMake support in Visual Studio. If you download the latest version of VS (even the community version), then you can just open a CMakeLIsts.txt file directly and VS will run the generation step for you. It works pretty well in my limited experience. It can a little tricky to figure out how to set some non-default options in this workflow, but that’s more advanced usage anyhow.
>
> -Mike
>
>
>> On Jul 31, 2018, at 6:46 PM, CrestChristopher<crestchristopher at gmail.com>  wrote:
>>
>> Hi, I'm using CMake for Windows as I was informed that I couldn't use `make` as the CMakeLists.txt file was only for CMake.
>>
>> Within CMake for Windows I select the location of the source code which is the cloned repository which include the CMakeLists.txt file that I want to compile, followed by I select a folder where to build the binaries; I'm then prompt for a generator for the project. Up to this point am I doing this correctly ?
>>
>> Thank You
>>
>>
>>
>>
>> On 7/31/2018 12:56 PM, Michael Ellery wrote:
>>> typical usage would be something like (assuming you are at repo root) :
>>>
>>> mkdir mybuild && cd mybuild
>>> cmake -DCMAKE_BUILD_TYPE=Release ..
>>> cmake —build .
>>>
>>> you can also opt to configure cmake (the equivalent of the first cmake command above) using a GUI like ccmake or cmake-gui if you prefer. The cmake build type can be changed depending on your needs. If the project depends on other libraries/tools, you might need to install those before building.
>>>
>>> HTH,
>>> Mike
>>>
>>>> On Jul 30, 2018, at 9:17 PM, CrestChristopher<crestchristopher at gmail.com>  wrote:
>>>>
>>>> Hi, I'm a beginner to CMake and for weeks I've been trying to compile a CMake file which I found on a github repository.  All I can say is I have a CMakeLists.txt file but I don't know how to compile and I hope someone can help ?
>>>>
>>>> Christopher
>>>>
>>>> --
>>>>
>>>> Powered bywww.kitware.com
>>>>
>>>> Please keep messages on-topic and check the CMake FAQ at:http://www.cmake.org/Wiki/CMake_FAQ
>>>>
>>>> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>>>>
>>>> CMake Support:http://cmake.org/cmake/help/support.html
>>>> CMake Consulting:http://cmake.org/cmake/help/consulting.html
>>>> CMake Training Courses:http://cmake.org/cmake/help/training.html
>>>>
>>>> Visit other Kitware open-source projects athttp://www.kitware.com/opensource/opensource.html
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> https://cmake.org/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180802/02fb50ea/attachment-0001.html>


More information about the CMake mailing list