tigersum/CMakeLists.txt

23 lines
960 B
CMake

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/cmake-d" "${CMAKE_MODULE_PATH}")
project(tigersum)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0 -Wall -Wextra")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -Wall -Wdeprecated")
set(CMAKE_D_FLAGS_DEBUG "${CMAKE_D_FLAGS_DEBUG} -funittest -g -O0 -Wall -Wdeprecated")
set(CMAKE_D_FLAGS_RELEASE "${CMAKE_D_FLAGS_RELEASE} -O3 -Wall -Wdeprecated")
option(REFERENCE_TIGER "Use the reference implementation of the tiger algorithm." OFF)
set(READ_BUFF_SIZE "1024 * 16")
#Just here to nicely print how big the read buffer will be, it doesn't really
#do anything important.
math(EXPR READ_BUFF_SIZE_RESULT "(${READ_BUFF_SIZE} / 64) * 64")
if (${READ_BUFF_SIZE_RESULT} LESS 64)
set(READ_BUFF_SIZE_RESULT 64)
endif()
message(STATUS "Read buffer size will be ${READ_BUFF_SIZE_RESULT} bytes")
unset(READ_BUFF_SIZE_RESULT)
add_subdirectory(src)