TheAlgorithms-C-Plus-Plus/CMakeLists.txt
David Leal 25b39a34fa
[fix/docs]: Update backtracking folder (#916)
* [fix/docs]: Update backtracking/graph_coloring.cpp

* Add CMakeLists.txt in backtracking folder

* Add backtracking to CMakeLists.txt

* fix: Fix build issues

* docs: Various documentation fixes

* fix: minimax.cpp issues

* fix: sudoku_solve.cpp fixes

* formatting source-code for 8ffbbb35ce

* make he code neat and clean without global variables

* fix 2 stars in comment

* fix MSVC errors by forcing template parameter in function calls

Note: This is identical to passing it as a function parameter, and may not be helpful

* Update minimax.cpp

* docs: minimax.cpp improvements

* docs: Add Wikipedia link in minimax.cpp

* fix: minimax.cpp vector fix

* docs: fix Wikipedia link in minimax.cpp

* docs: fix return statement in minimax.cpp

* fix: sudoku_solve.cpp fixes

* fix: more sudoku_solve.cpp fixes

* fix: sudoku_solve.cpp fixes

* fix: sudoku_solve.cpp

* formatting source-code for 13b5b9b829

* docs: update graph_coloring.cpp description

* fix: use array instead of vector (minimax.cpp)

* feat: add namespace (minimax.cpp)

* docs: update namespace description (graph_coloring.cpp)

* fix: graph_coloring.cpp

* fix: sudoku_solve.cpp fixes

* fix: graph_coloring.cpp

* fix: minimax.cpp

* fix: more sudoku_solve.cpp fixes

* fix: more graph_coloring.cpp fixes

* fix: graph_coloring.cpp fixes

* fix: sudoku_solve.cpp fixes

* fix: minimax.cpp

* fix: sudoku_solve.cpp fixes

* fix: too few template arguments (std::array)

* fix: too few template arguments (std::array, minimax.cpp)

* fix: narrowing conversion from double to int (minimax.cpp)

* fix: excess elements in struct initializer (graph_coloring.cpp)

* fix: no matching function (graph_coloring.cpp)

* fix: graph_coloring.cpp issues/errors

* fix: knight_tour.cpp issues/errors

* fix: sudoku_solve.cpp issues/errors

* [fix/docs]: Various fixes in graph_coloring.cpp

* fix: More graph_coloring.cpp fixes

* docs: Add initial comment block (sudoku_solve.cpp)

* fix: Add return statement (knight_tour.cpp)

* fix: array fixes (graph_coloring.cpp)

* docs: documentation improvements (sudoku_solve.cpp)

* docs: documentation improvements (knight_tour.cpp)

* docs: documentation improvements (sudoku_solve.cpp)

* docs: documentation improvements (graph_coloring.cpp)

* docs: Documentation improvements (graph_coloring.cpp)

Thanks, @kvedala!

* docs: Documentation improvements (sudoku_solve.cpp)

* docs: Document function parameter (sudoku_solve.cpp)

* docs: Documentation improvements (knight_tour.cpp)

* docs: Add long description (graph_coloring.cpp)

* docs: Add long description (minimax.cpp)

* docs: Add long description (sudoku_solve.cpp)

* docs: Documentation improvements (knight_tour.cpp)

* docs: Documentation improvements (sudoku_solve.cpp)

* docs: Documentation improvements (minimax.cpp)

* docs: More documentation improvements (minimax.cpp)

* docs: Documentation improvements (sudoku_solve.cpp)

* fix: sudoku_solve.cpp improvements

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-08-07 14:35:59 -04:00

92 lines
2.7 KiB
CMake

cmake_minimum_required(VERSION 3.9)
project(Algorithms_in_C++
LANGUAGES CXX
VERSION 1.0.0
DESCRIPTION "Set of algorithms implemented in C++."
)
# set(CMAKE_CXX_CPPLINT "~/anaconda3/bin/cpplint --filter=-legal/copyright --std=c++11")
# find_program(CLANG_FORMAT "clang-format")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(MSVC)
# set(CMAKE_CXX_STANDARD 14)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
option(USE_OPENMP "flag to use OpenMP for multithreading" ON)
if(USE_OPENMP)
find_package(OpenMP)
if (OpenMP_CXX_FOUND)
message(STATUS "Building with OpenMP Multithreading.")
else()
message(STATUS "No OpenMP found, no multithreading.")
endif()
endif()
add_subdirectory(math)
add_subdirectory(others)
add_subdirectory(search)
add_subdirectory(ciphers)
add_subdirectory(hashing)
add_subdirectory(strings)
add_subdirectory(sorting)
add_subdirectory(geometry)
add_subdirectory(graphics)
add_subdirectory(probability)
add_subdirectory(backtracking)
add_subdirectory(data_structures)
add_subdirectory(machine_learning)
add_subdirectory(numerical_methods)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0057 NEW)
find_package(Doxygen OPTIONAL_COMPONENTS dot dia)
if(DOXYGEN_FOUND)
set(DOXYGEN_GENERATE_MAN NO)
set(DOXYGEN_USE_MATHJAX YES)
set(DOXYGEN_GENERATE_HTML YES)
# set(DOXYGEN_HTML_TIMESTAMP YES)
set(DOXYGEN_EXTRACT_STATIC YES)
set(DOXYGEN_INLINE_SOURCES YES)
set(DOXYGEN_CREATE_SUBDIRS YES)
set(DOXYGEN_EXTRACT_PRIVATE YES)
set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_STRIP_CODE_COMMENTS NO)
set(DOXYGEN_EXT_LINKS_IN_WINDOW YES)
set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
set(DOXYGEN_ENABLE_PREPROCESSING YES)
set(DOXYGEN_CLANG_ASSISTED_PARSING YES)
set(DOXYGEN_FILE_PATTERNS *.cpp *.h *.hpp *.md)
set(DOXYGEN_MATHJAX_EXTENSIONS TeX/AMSmath TeX/AMSsymbols)
set(DOXYGEN_TAGFILES "doc/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/")
if(MSVC)
set(DOXYGEN_CPP_CLI_SUPPORT YES)
endif()
set(DOXYGEN_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML")
if(Doxygen_dot_FOUND)
set(DOXYGEN_HAVE_DOT YES)
set(DOXYGEN_CALL_GRAPH YES)
set(DOXYGEN_INTERACTIVE_SVG YES)
set(DOXYGEN_DOT_IMAGE_FORMAT "svg")
endif()
if(OPENMP_FOUND)
set(DOXYGEN_PREDEFINED "_OPENMP=1")
endif()
if(GLUT_FOUND)
set(DOXYGEN_PREDEFINED ${DOXYGEN_PREDEFINED} "GLUT_FOUND=1")
endif()
doxygen_add_docs(
doc
${PROJECT_SOURCE_DIR}
COMMENT "Generate documentation"
)
endif()
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)