COIN-OR::LEMON - Graph Library

Version 16 (modified by Alpar Juttner, 16 years ago) (diff)

--

Install on Windows (from source, with CMAKE)

Prerequisites

Optional tools

Obtaining the Source

Configure the CMAKE

The compilation must be done in a separate folder. We suggest to create a subfolder called build in the root of the source code repository.

Then start the CMake GUI and browse the source code and the build folders.

It is even better to start the "Visual Studio 2008 Command Prompt" from the start menu. Then, in the command prompt, step into the build folder and type

cmake-gui ..

then it will usually set the right source and build folder. (But check it!)

Now click on the "Configure" button. Here choose

  • either Visual Studio 9 2008 to create project files and an {{{.sln}} file usable from the Visual Studio IDE.
  • or NMake Makefiles to create makefiles and compile from command line. In this case you must start cmake-gui from the "Visual Studio 2008 Command Prompt"

Now, you can review and modify several configure options (change to "Advanced" or "Grouped" view in order to see all of them). For example

  • CMAKE_INSTALL_PREFIX tells where LEMON will finally be installed.
  • CMAKE_BUILD_TYPE determines the build modes. The possible values are Debug, Release, MinSizeRel and RelWithDebInfo.
  • CMAKE_CXX_FLAGS* sets the compiler flags used by the different build modes.

Then click again on "Configure" and finally on "Generate".

The configuration is done

Build and install

With NMake

  • Start the "Visual Studio 2008 Command Prompt".
  • Step into the build folder
  • To compile the source and build the library, type
    nmake
    
  • For executing the self tests, run
    ctest
    
  • To generate the HTML documentation (see the prerequisites above), type
    nmake html
    
  • Finally, to install LEMON, type
    nmake install
    

With IDE

Open the generated LEMON.sln file, then you will find several targets corresponding to the tasks of the previous section. They are

  • ALL_BUILD
  • RUN_TESTS
  • HTML
  • INSTALL

Simply right click and choose "Build" for each of these target.