-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
executable file
·53 lines (42 loc) · 1.48 KB
/
CMakeLists.txt
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
43
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 3.13)
project(turbovoxels VERSION 1.0
DESCRIPTION "Turbovoxels Segmentation"
LANGUAGES CXX)
message(STATUS "Found CMAKE-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
message(STATUS "----------------Running CMake---------------------------------")
cmake_host_system_information(RESULT HOSTNAME QUERY HOSTNAME)
message(STATUS "Invoking CMAKE on : ${HOSTNAME} running: ${CMAKE_HOST_SYSTEM}")
set(ITK_DIR $ENV{HOME}/opt/itk/lib/cmake/ITK-5.3)
message(STATUS "ITK Directory ${ITK_DIR}")
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb -O3 -Wall -march=native")
set(CMAKE_EXE_LINKER_FLAGS "-rdynamic")
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
include_directories(include)
# Tests
#enable_testing()
#add_subdirectory(tests)
# Source
set(SOURCES
main.cpp
src/itkCommandLineArgumentParser.cxx
src/smoothing.cpp
src/chanvese.cpp
src/slic.cpp
src/thresholding.cpp
src/regionprops.cpp
src/experiment.cpp
src/utils.cpp
src/monitor.cpp
src/levelSetEvolution.cpp
src/boundaries.cpp
src/turbovoxels.cpp)
add_executable(turbo ${SOURCES})
if((${CMAKE_COMPILER_IS_GNUCXX}) AND (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS_EQUAL 8))
message(STATUS "Compiler version: ${CMAKE_CXX_COMPILER_VERSION}: adding stdc++fs library to link")
target_link_libraries(turbo ${ITK_LIBRARIES} stdc++fs)
else()
target_link_libraries(turbo ${ITK_LIBRARIES})
endif()