TheAlgorithms-C/CMakeLists.txt

33 lines
867 B
CMake
Raw Normal View History

2020-04-07 11:50:46 +08:00
cmake_minimum_required(VERSION 3.0)
project(Algorithms_in_C
LANGUAGES C CXX
VERSION 1.0.0
DESCRIPTION "Set of algorithms implemented in C."
)
option(USE_OPENMP "flag to use OpenMP for multithreading" ON)
2020-04-07 11:50:46 +08:00
add_subdirectory(function_timer EXCLUDE_FROM_ALL)
include_directories(function_timer/include)
2020-04-07 12:00:04 +08:00
# link_libraries(function_timer)
2020-04-07 11:50:46 +08:00
# include_directories(${CMAKE_BINARY_DIR}/include)
# link_directories(${CMAKE_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE})
2020-04-08 21:30:46 +08:00
set(CMAKE_C_STANDARD 11)
2020-04-08 10:27:27 +08:00
set(CMAKE_C_STANDARD_REQUIRED ON)
2020-04-07 11:50:46 +08:00
add_subdirectory(conversions)
2020-04-07 12:00:04 +08:00
add_subdirectory(misc)
add_subdirectory(project_euler)
2020-04-08 06:11:24 +08:00
add_subdirectory(sorting)
2020-04-08 09:25:45 +08:00
add_subdirectory(searching)
add_subdirectory(computer_oriented_statistical_methods)
2020-04-07 11:50:46 +08:00
if(USE_OPENMP)
find_package(OpenMP)
endif()
2020-04-07 11:50:46 +08:00
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)