Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-bray authored Jul 13, 2017
1 parent 60112d5 commit 5627c8a
Showing 1 changed file with 47 additions and 54 deletions.
101 changes: 47 additions & 54 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,6 @@ Currently, a compiler with at C++11 support is expected (e.g. GCC 4.8, Visual
Studio 2015) is required. KWIVER requires C++11; however, Fletch may compile
with older compilers.


Running CMake
-------------

We recommend building Fletch out of the source directory to prevent mixing
source files with compiled products. Create a build directory in parallel
with the Fletch source directory. From the command line, enter the
empty build directory and run::

$ ccmake /path/to/fletch/source

where the path above is the location of your Fletch source tree. The ccmake
tool allows for interactive selection of CMake options. Alternatively, using
the CMake GUI you can set the source and build directories accordingly and
press the "Configure" button.


CMake Options
-------------

Expand All @@ -124,43 +107,55 @@ want the C++ libraries built.
``fletch_ENABLE_`` *package* Enables the named *package* for building
============================== =================================================

CMake Configuration
-------------------

The recommended CMake configuration is to enable all packages and, if desired, python :

If you are using ccmake or the CMake GUI, simply check the option for fletch_ENABLE_ALL_PACKAGES and, if desired, fletch_ENABLE_PYTHON

If you are running from a shell or cmd window,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~bash
mkdir fletch
cd fletch
# Pull the source into a subfolder 'src'
git clone https://github.com/Kitware/fletch.git src
# Create a folder to build in
mkdir build
cd build
# Feel free to make subfolders here, like debug or release
# Generate a make file/msvc solution from the desired subfolder
# Note you need to provide cmake the source directory at the end (relative or absolute)
# Run CMake (it will use the system default compiler if you don't provide options or use the CMake GUI)
# Also, if using visual studio, you do no need to provide the build type
cmake -DCMAKE_BUILD_TYPE=Release -Dfletch_ENABLE_ALL_PACKAGES=ON -Dfletch_ENABLE_PYTHON=ON ../src
# Again, python very popular option, but is optional

# Execute make on Linux/OSX/MinGW
make

# For MSVC
# Open the generated fletch.sln and build the project in the desired configuration.
# Note you should only build one configuration, if you need multiple configurations
# you should create multiple subfolders and repeat the above insturctions for each configuration
# Also If you enable Python, please ensure that python is on your Windows PATH

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running CMake
-------------

You may run cmake directly from a shell or cmd window.
On unix systems, the ccmake tool allows for interactive selection of CMake options.
Available for all platforms, the CMake GUI can set the source and build directories, options,
"Configure" and "Generate" the build files all with the click of a few button.
When running the cmake gui, we also recommend to select the 'Grouped' and 'Advanced' options
to better organize the options available.

We recommend building Fletch out of the source directory to prevent mixing
source files with compiled products. Create a build directory in parallel
with the Fletch source directory for each desired configuration. For example :

========================== ===================================================================
``\fletch\src`` contains the code from the git repository
``\fletch\build\release`` contains the built files for the release configuration
``\fletch\build\debug`` contains the built files for the debug configuration
========================== ===================================================================

The recommended CMake configuration is to enable all packages and, if desired, python.

If you are using ccmake or the CMake GUI,
* Set the source and build locations
* Check the option for fletch_ENABLE_ALL_PACKAGES and, if desired, fletch_ENABLE_PYTHON
* Configure
* Generate the build files

Running from a shell or cmd window::

mkdir fletch
cd fletch
# Pull the source into a subfolder 'src'
git clone https://github.com/Kitware/fletch.git src
# Create a folder to build in
mkdir build/release
cd build/release
# Note you need to provide cmake the source directory at the end (relative or absolute)
# Run CMake (it will use the system default compiler if you don't provide options or use the CMake GUI)
# Also, if using visual studio, you do no need to provide the build type
cmake -DCMAKE_BUILD_TYPE=Release -Dfletch_ENABLE_ALL_PACKAGES=ON -Dfletch_ENABLE_PYTHON=ON ../../src
# Again, python very popular option, but is optional
On Linux/OSX/MinGW, execute make

For MSVC users, open the generated fletch.sln and build the project in the configuration associated with the build folder.
Even though MSVC supports building multiple configurations, you should only build one configuration per build folder.
If you need multiple configurations you should create multiple subfolders and repeat the above insturctions for each configuration.
Also If you enable Python, please ensure that python is on your Windows PATH

Getting Help
============
Expand All @@ -169,8 +164,6 @@ Fletch is a component of Kitware_'s collection of open source tools.
Please join the `fletch-users <http://public.kitware.com/mailman/listinfo/fletch-users>`_
mailing list to discuss Fletch or to ask for help with using Fletch.



.. Appendix I: References
.. ======================
Expand Down

0 comments on commit 5627c8a

Please sign in to comment.