Repository navigation
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·42 lines (35 loc) · 1.59 KB
/
Copy pathCMakeLists.txt
File metadata and controls
executable file
·42 lines (35 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#----------------------------------------------------
# default build-type (release)
# (the next lines must be called bevore project(ilastiktools))
#----------------------------------------------------
IF(DEFINED CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ELSE()
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF()
cmake_minimum_required(VERSION 3.10)
project(ilastik_carving_tools)
#--------------------------------------------------------
# global headers
#--------------------------------------------------------
include_directories(include)
FIND_PACKAGE(Vigra REQUIRED)
include_directories(${Vigra_INCLUDE_DIRS})
FIND_PACKAGE(Threads REQUIRED) # includes pthread
#--------------------------------------------------------
# OpenMP
#--------------------------------------------------------
option (WITH_OPENMP "use openmp" ON)
if(WITH_OPENMP)
FIND_PACKAGE(OpenMP REQUIRED)
message(STATUS "build with OpenMP")
add_definitions(-DWITH_OPENMP)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else()
message(STATUS "build without openMP -> multithreaded options disabled")
endif(WITH_OPENMP)
#--------------------------------------------------------
# source directory
#--------------------------------------------------------
add_subdirectory(src)