-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
51 lines (43 loc) · 1.96 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
# ==== Define cmake build policies that affect compilation and linkage default behaviors
#
# Set the NEWEST_VALIDATED_POLICIES_VERSION string to the newest cmake version
# policies that provide successful builds. By setting NEWEST_VALIDATED_POLICIES_VERSION
# to a value greater than the oldest policies, all policies between
# OLDEST_VALIDATED_POLICIES_VERSION and CMAKE_VERSION (used for this build)
# are set to their NEW behaivor, thereby suppressing policy warnings related to policies
# between the OLDEST_VALIDATED_POLICIES_VERSION and CMAKE_VERSION.
#
# CMake versions greater than the NEWEST_VALIDATED_POLICIES_VERSION policies will
# continue to generate policy warnings "CMake Warning (dev)...Policy CMP0XXX is not set:"
#
set(OLDEST_VALIDATED_POLICIES_VERSION "3.16.3")
set(NEWEST_VALIDATED_POLICIES_VERSION "3.19.7")
cmake_minimum_required(VERSION ${OLDEST_VALIDATED_POLICIES_VERSION}...${NEWEST_VALIDATED_POLICIES_VERSION} FATAL_ERROR)
#-----------------------------------------------------------------------------
# Enable C++14
#-----------------------------------------------------------------------------
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
message(STATUS "${_msg} - C++${CMAKE_CXX_STANDARD}")
if(NOT CMAKE_CXX_STANDARD MATCHES "^(14|17|20)$")
message(FATAL_ERROR "CMAKE_CXX_STANDARD must be set to 14, 17, or 20")
endif()
project( NormalizeDWIGradientVectors )
if(NOT SETIFEMPTY)
macro(SETIFEMPTY)
set(KEY ${ARGV0})
set(VALUE ${ARGV1})
if(NOT ${KEY})
set(${KEY} ${VALUE})
endif()
endmacro()
endif()
SETIFEMPTY(INSTALL_RUNTIME_DESTINATION bin)
find_package( ITK 5.3 REQUIRED )
include( ${ITK_USE_FILE} )
add_executable( NormalizeDWIGradientVectors NormalizeDWIGradientVectors.cxx )
target_link_libraries( NormalizeDWIGradientVectors ${ITK_LIBRARIES} )
install( TARGETS NormalizeDWIGradientVectors RUNTIME DESTINATION ${INSTALL_RUNTIME_DESTINATION} )