From 5627c8af6989ecb8c4ca74edb564bf0db8a64d72 Mon Sep 17 00:00:00 2001 From: aaron-bray Date: Thu, 13 Jul 2017 15:37:28 -0400 Subject: [PATCH] Update README.rst --- README.rst | 101 +++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 54 deletions(-) diff --git a/README.rst b/README.rst index 0cf7f4a8..33639e30 100644 --- a/README.rst +++ b/README.rst @@ -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 ------------- @@ -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 ============ @@ -169,8 +164,6 @@ Fletch is a component of Kitware_'s collection of open source tools. Please join the `fletch-users `_ mailing list to discuss Fletch or to ask for help with using Fletch. - - .. Appendix I: References .. ======================