From 60112d5362dd88f1167dc6db4eaf75ed3a6b8e13 Mon Sep 17 00:00:00 2001 From: Aaron Bray Date: Thu, 13 Jul 2017 15:09:11 -0400 Subject: [PATCH 1/3] Added a walk through for building from scratch --- README.rst | 48 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 7bfbc2b3..0cf7f4a8 100644 --- a/README.rst +++ b/README.rst @@ -124,17 +124,51 @@ 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 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + Getting Help ============ -MAP-Tk is a component of Kitware_'s collection of open source computer vision -tools known as KWIVER_. Please join the -`kwiver-users `_ +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. -For less frequent announcements about Fletch and other KWIVER components, -please join the -`kwiver-announce `_ -mailing list. + .. Appendix I: References From 5627c8af6989ecb8c4ca74edb564bf0db8a64d72 Mon Sep 17 00:00:00 2001 From: aaron-bray Date: Thu, 13 Jul 2017 15:37:28 -0400 Subject: [PATCH 2/3] 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 .. ====================== From 72b4b57d0f9d53dc42f894375a3c1d741874355a Mon Sep 17 00:00:00 2001 From: Aaron Bray Date: Tue, 18 Jul 2017 14:22:58 -0400 Subject: [PATCH 3/3] Typos and note for windows users --- README.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 33639e30..a828a3a5 100644 --- a/README.rst +++ b/README.rst @@ -123,10 +123,12 @@ 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 +``\fletch\build\rel`` contains the built files for the release configuration +``\fletch\build\deb`` contains the built files for the debug configuration ========================== =================================================================== +** NOTE: Windows users, there is a known issue in Qt that will cause a build error if you name a build folder 'release' or 'debug' ** + The recommended CMake configuration is to enable all packages and, if desired, python. If you are using ccmake or the CMake GUI, @@ -142,8 +144,8 @@ Running from a shell or cmd window:: # 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 + mkdir build/rel + cd build/rel # 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 @@ -154,7 +156,7 @@ 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. +If you need multiple configurations you should create multiple subfolders and repeat the above instructions for each configuration. Also If you enable Python, please ensure that python is on your Windows PATH Getting Help