CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: CMake

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    CMake

    I've been asked to build a library which apparently needs to get built using CMake (which I've never used before). Can anyone tell me how simple it's likely to be? i.e. is CMake fairly self-contained? Or will I end up needing to install a bunch of other stuff too? (MSVC will be the actual compiler)
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,824

    Re: CMake

    CMake is a system that manages the build process in a compiler-independent manner. It uses config files (CmakeLists.txt) to generate standard build environments for compilers which will then undertake the compile/link using the required compiler (MSVC, gcc etc). For windows install there are pre-compiled binaries available as an MSI package. AFAIK you don't need anything else.

    See
    https://cmake.org/install/
    https://cmake.org/overview/

    Note however, that Cmake does nothing that can't be done without it. It's only a wrapper for the compiler. If however you have the CMakeLists.txt file(s) then generating the .exe for a complicated solution will be easier than manually configuring MSVC.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    Re: CMake

    Thanks 2kaud. I installed CMake this morning and so far, it seems to be working fine
    "A problem well stated is a problem half solved.” - Charles F. Kettering

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured