/****************************************************************************
 *   This file is part of the aGrUM/pyAgrum library.                        *
 *                                                                          *
 *   Copyright (c) 2005-2025 by                                             *
 *       - Pierre-Henri WUILLEMIN(_at_LIP6)                                 *
 *       - Christophe GONZALES(_at_AMU)                                     *
 *                                                                          *
 *   The aGrUM/pyAgrum library is free software; you can redistribute it    *
 *   and/or modify it under the terms of either :                           *
 *                                                                          *
 *    - the GNU Lesser General Public License as published by               *
 *      the Free Software Foundation, either version 3 of the License,      *
 *      or (at your option) any later version,                              *
 *    - the MIT license (MIT),                                              *
 *    - or both in dual license, as here.                                   *
 *                                                                          *
 *   (see https://agrum.gitlab.io/articles/dual-licenses-lgplv3mit.html)    *
 *                                                                          *
 *   This aGrUM/pyAgrum library is distributed in the hope that it will be  *
 *   useful, but WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,          *
 *   INCLUDING BUT NOT LIMITED TO THE WARRANTIES MERCHANTABILITY or FITNESS *
 *   FOR A PARTICULAR PURPOSE  AND NONINFRINGEMENT. IN NO EVENT SHALL THE   *
 *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
 *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,        *
 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR  *
 *   OTHER DEALINGS IN THE SOFTWARE.                                        *
 *                                                                          *
 *   See LICENCES for more details.                                         *
 *                                                                          *
 *   SPDX-FileCopyrightText: Copyright 2005-2025                            *
 *       - Pierre-Henri WUILLEMIN(_at_LIP6)                                 *
 *       - Christophe GONZALES(_at_AMU)                                     *
 *   SPDX-License-Identifier: LGPL-3.0-or-later OR MIT                      *
 *                                                                          *
 *   Contact  : info_at_agrum_dot_org                                       *
 *   homepage : http://agrum.gitlab.io                                      *
 *   gitlab   : https://gitlab.com/agrumery/agrum                           *
 *                                                                          *
 ****************************************************************************/


/*!
 * \page using_agrum How to create a simple project with aGrUM and cmake
 *
 * As a build system, aGrUM uses CMake (http://www.cmake.org). A minimal project
 * with agrum should look like this (for a project foo):
 * - in the project folder, a sub-folder src,
 * - in src folder, your *.{cpp|h|etc.} files
 * - in the project folder, a file CMakeLists.txt like this one :
 *
 * \code{.cmake}
project(FOO)
# do not forget to change "FOO", "FOO_SOURCE" and "FOO_SOURCE_DIR" with the name of your project
# do not forget to change the target "foo" with the name of your executable

cmake_minimum_required(VERSION 3.13)

# make RELEASE the default option
if(NOT DEFINED CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release)
endif()

project(EXAMPLE)

# do not forget to change this line: the path where you installed aGrUM with ("act install -d...")
set(AGRUM_INSTALLATION_DIRECTORY "/home/xxx/usr")
set(aGrUM_DIR "${AGRUM_INSTALLATION_DIRECTORY}/lib/cmake/aGrUM/")
find_package(aGrUM CONFIG REQUIRED)

file(GLOB_RECURSE FOO_SOURCE ${FOO_SOURCE_DIR}/src/*.cpp)
add_executable (foo ${FOO_SOURCE})

target_include_directories (foo PRIVATE src)

# here we link to agrumBASE since we're only using the base component
target_link_libraries (foo PRIVATE agrumBASE)

# (in this folder)
# to compile release version
#
#     cmake -DCMAKE_BUILD_TYPE=RELEASE -B build .
#     cmake --build build
#
# to compile debug version
#
#     cmake -DCMAKE_BUILD_TYPE=Debug -B build_debug .
#     cmake --build build_debug
#
 * \endcode
 *
 * - a minimal src/example.cpp:
 * \code{.cpp}
#include <iostream>

#include <agrum/base.h>

int main(void) {
  gum::HashTable<std::string,int> h;

  h.insert("Hello",1);
  h.insert("World",2);

  std::cout << h << std::endl;
}
 * \endcode
 *
 * - to compile the project (from the project folder)
 *
 * \code{.sh}
 *     cmake -B build_release .
 *     cmake --build build
 * \endcode
 *
 * - build/foo is the executable.
 *
 */
