From 37c3a40e7ddeea5eefab7e68a83c477bf630c212 Mon Sep 17 00:00:00 2001 From: Aleksander Gajos Date: Mon, 8 Feb 2016 11:45:48 +0100 Subject: [PATCH] Add the 'documentation' target to CMakeLists. Update README and INSTALL files Former-commit-id: 61aa2e16df9b9f8d12942a0ba02688cb0c75cdac --- CMakeLists.txt | 12 +++++ Doxyfile => Doxyfile.in | 15 +++--- INSTALL | 108 ++++++++++++++++++++++++++++++++++++++++ README | 9 ++-- 4 files changed, 134 insertions(+), 10 deletions(-) rename Doxyfile => Doxyfile.in (99%) create mode 100644 INSTALL diff --git a/CMakeLists.txt b/CMakeLists.txt index 02ec1672d..1312ab196 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,3 +231,15 @@ endif() if(UNIX AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") set_target_properties(Unpacker2 tinyxml2 PROPERTIES COMPILE_FLAGS "-fPIC") endif() + + +# generating documentation with Doxygen +find_package(Doxygen) +if(DOXYGEN_FOUND) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) + add_custom_target(documentation + ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" VERBATIM + ) +endif(DOXYGEN_FOUND) \ No newline at end of file diff --git a/Doxyfile b/Doxyfile.in similarity index 99% rename from Doxyfile rename to Doxyfile.in index b21e434ca..0be6e5348 100644 --- a/Doxyfile +++ b/Doxyfile.in @@ -47,7 +47,7 @@ PROJECT_BRIEF = # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. -PROJECT_LOGO = ./logo.png +PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/logo.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -654,7 +654,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = +INPUT = @CMAKE_CURRENT_SOURCE_DIR@/ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -686,10 +686,12 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = ./framework/JPetUnpacker/ -EXCLUDE += ./workdir/ -EXCLUDE += ./framework/DummyClass/ -EXCLUDE += ./framework/tests/ +EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/JPetUnpacker/ +EXCLUDE += @CMAKE_CURRENT_SOURCE_DIR@/DummyClass/ +EXCLUDE += @CMAKE_CURRENT_SOURCE_DIR@/unitTestData/ +EXCLUDE += @CMAKE_CURRENT_SOURCE_DIR@/unitTestUtils/ +EXCLUDE += @CMAKE_CURRENT_SOURCE_DIR@/workdir/ +EXCLUDE += @CMAKE_CURRENT_SOURCE_DIR@/extras/ # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -704,6 +706,7 @@ EXCLUDE_SYMLINKS = NO # for example use the pattern */test/* EXCLUDE_PATTERNS = *Dict* +EXCLUDE_PATTERNS += *Test* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the diff --git a/INSTALL b/INSTALL new file mode 100644 index 000000000..4e3db41b5 --- /dev/null +++ b/INSTALL @@ -0,0 +1,108 @@ +Basic installation +------------------ + + 1. Install the required libraries and tools. + Refer to the 'Requirements' section of this document for details. + You can find ready commands for some systems in the + 'Requirements installation' section. + + 2. Create a directory where the built programs will be placed, e.g. + in the main directory: + + mkdir build + cd build + + 3. Invoke the CMake build tool and provide the path to the main directory + If you created the build directory in the main one and entered 'build' + as in step 2. then do: + + cmake .. + + 4. To compile the J-PET framework library do: + + make + + 5. Once the compilation is finished, there should be a file + 'libJPetFramework.so' in the build directory. + +Code documentation +------------------ + +To generate the code documentation of the J-PET Framework library, +the Doxygen software must be installed. + +To generate the documentation just go to the j-pet-framework build directory +and do: + + make documentation + +and the documentation will be generated and put in folders named latex and html inside the build directory. + +Requirements +------------ + + 1. ROOT (http://root.cern.ch) with properly paths + The recommended version of ROOT is 5.34. Note that this framework is not yet compatible with ROOT versions >= 6.00. + + 2. gcc + + 3. Doxygen (www.doxygen.org) only if you want to generate + the code documentation + + 4. BOOST packages + + 5. libpqxx (connection between framework and database) [1] + + 6. libconfig++ [2] + + 7. cmake [3] + +Tested Platforms +---------------- + + 1. Ubuntu x86_64 GNU/Linux + gcc 4.6.3 + ROOT v5.32 + + 2. Ubuntu 12.04.1 LTS 2013 i386 GNU/Linux + gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + ROOT v5.34/18 + + 3. Debian GNU/Linux Sid + gcc-4.9.real (Debian 4.9.2-10) 4.9.2 + 5.34/26 + + 4. Fedora 20 + +Annotation +---------------- + + [1] + Official website: + https://pqxx.org/development/libpqxx/ + Documentation: + http://pqxx.org/devprojects/libpqxx/doc/4.0/html/Reference/a00001.html + Other packages related to libpqxx: + http://packages.ubuntu.com/lucid/libpqxx-dev + + [2] + Official website: + http://www.hyperrealm.com/libconfig/ + Documentation: + http://www.hyperrealm.com/libconfig/libconfig_manual.html + + [3] + Official website: + https://cmake.org/ + Documentation: + https://cmake.org/documentation + +Requirements installation +---------------- + +For Ubuntu: + +sudo apt-get install libboost-all-dev libpqxx-3.1 libpqxx3-dev libconfig++ cmake + +For Fedora 20: +sudo yum install boost-devel libpqxx libpqxx-devel libconfig libconfig-devel cmake diff --git a/README b/README index a5ee6daab..aa091711b 100644 --- a/README +++ b/README @@ -9,7 +9,7 @@ It is written in C++ using the object-oriented approach. It is based on the ROOT The Latest Version ------------------ -The latest stable version can be downloaded from the git repository. You must have git client istalled and have rights to access the subversion. If it is the case you can just: +The latest stable version can be downloaded from the git repository. You must have git client istalled and have rights to access the repository. If it is the case you can just: git clone ssh://yourUser@koza.if.uj.edu.pl/srv/git/j-pet-framework.git myFramework cd myFramework @@ -26,8 +26,9 @@ Documentation The program documentation will be added along the framework development. The code documentation can be generated with Doxygen package using: -$> make documentation -The index.html file will be available in the html/ directory. +$> make documentation +in the build directory (see the INSTALL file). +The index.html file will be available in the html/ directory located inside the build directory. Installation ------------ @@ -37,7 +38,7 @@ Please see the file called INSTALL. Authors ------- -J-Pet analysis framework is being developed by Wojciech Krzemien, Karol Stola, Damian Trybek, Aleksander Gajos and Andrzej Gruntowski. +J-Pet analysis framework is being developed by Wojciech Krzemien, Karol Stola, Damian Trybek, Aleksander Gajos, Andrzej Gruntowski, Szymon Niedźwiecki, Oleksandr Rundel and Tomasz Kisielewski. Bug Reporting & Contact -----------------------