libqaeda

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

build.md (1788B)


      1 ---
      2 title: Building
      3 description: A guide on how to build the cwalk path library for C/C++.
      4 ---
      5 
      6 In order to build the source, you will have to download it. You can do so using git (or download it from [here](https://github.com/likle/cwalk/archive/stable.zip)).
      7 ```bash
      8 git clone -b stable git@github.com:likle/cwalk.git
      9 ```
     10 
     11 **Note**: The *stable* branch points to the latest stable version. You should 
     12 always use a stable version in production code.
     13 
     14 ## Using Windows
     15 Visual Studio 2017 is recommended, then you can just open the source using ``File -> Open -> CMake...``. You can use Visual Studio to compile the source and debug the code. Make sure you have the CMake and C/C++ features enabled.
     16 
     17 ## Using Ubuntu
     18 You will need [CMake](https://cmake.org/download/) and either gcc or clang installed. On Ubuntu you can use the following to compile **cwalk**:
     19 ```bash
     20 sudo apt-get install build-essential cmake
     21 mkdir cwalk/build
     22 cd cwalk/build
     23 cmake ..
     24 make
     25 ```
     26 
     27 ## Using MacOS
     28 You will need [CMake](https://cmake.org/download/) and either gcc or clang installed. On MacOS you can use the following to compile **cwalk**:
     29 ```
     30 brew install cmake gcc
     31 mkdir cwalk/build
     32 cd cwalk/build
     33 cmake ..
     34 make
     35 ```
     36 # Running Tests
     37 In order to run tests, cwalk needs to be built with tests enabled. There is a ``ENABLE_TESTS`` flag for that. It can be passed to the cmake command like this:
     38 ```
     39 cmake .. -DENABLE_TESTS=1
     40 ```
     41 
     42 After building **cwalk** you can run tests to ensure everything is fine. In order to do that, make sure that you are in the build folder and then execute the test program:
     43 ```bash
     44 ./cwalktest
     45 ```
     46 
     47 That's it!
     48 
     49 You can even specify which tests to execute by optionally specifying the category and test name:
     50 ```bash
     51 # ./cwalktest [category] [test]
     52 ./cwalktest normalize mixed
     53 ```