fitsview-hartmann/CMakeLists.txt
2014-09-22 14:48:19 +04:00

25 lines
721 B
CMake

cmake_minimum_required(VERSION 2.6)
set(PROJ fitsview)
project(${PROJ})
set(CMAKE_COLOR_MAKEFILE ON)
set(DEBUG 1) # ÚÁËÏÍÍÅÎÔÉÒÏ×ÁÔØ ÜÔÕ ÓÔÒÏËÕ ÐÏ ÏËÏÎÞÁÎÉÉ "ÒÁÚÒÁÂÏÔËÉ"
if(NOT DEFINED NO_CUDA)
message("Try to use CUDA")
find_package(CUDA)
if(CUDA_FOUND)
add_definitions(-DCUDA_FOUND)
endif()
endif()
if(NOT DEFINED PROCESSOR_COUNT)
set(PROCESSOR_COUNT 2) # by default 2 cores
set(cpuinfo_file "/proc/cpuinfo")
if(EXISTS "${cpuinfo_file}")
file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$")
list(LENGTH procs PROCESSOR_COUNT)
endif()
endif()
add_definitions(-DTHREAD_NUMBER=${PROCESSOR_COUNT})
message("In multithreaded operations will use ${PROCESSOR_COUNT} threads")
subdirs(src)