CMakeLists.txt 3.93 KB
Newer Older
1
if (WIN32)
2
    if(CMAKE_CL_64)
3
        # for 64 bits platform, enable big obj (.o) handling, in order to correctly compile this (heavy) project
4
        if (MSVC)
5
6
7
8
            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
        elseif(MINGW)
            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -finline-functions")
        endif()
9
    endif()
10
11
endif()

12
13
14
15
16
17
camitk_extension(ACTION_EXTENSION
                 NEEDS_ITK
                 CXX_FLAGS "-w"
                 CEP_NAME CEP_IMAGING
                 DESCRIPTION "This action features basic ITK image processing filters"
                 DEFINES COMPILE_ITKFILTER_API
18
                 ENABLE_AUTO_TEST
19
                 TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd ramp1.gipl
20
                 ENABLE_INTEGRATION_TEST
21
)
lealv's avatar
lealv committed
22

Emmanuel Promayon's avatar
Emmanuel Promayon committed
23
24
25
26
# --------------------------------
# --- Specific test management ---
# --------------------------------

27
# Test failure due to ITK exception
Emmanuel Promayon's avatar
Emmanuel Promayon committed
28
# For now disable these tests until this can be taken care of in the save() method
29
30
31
32
33
# TODO check if it possible to avoid this exception
# For input file: biorad.pic
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x55b3b21bc700): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed...
34
set_tests_properties(action-itkfilters-level1-6 PROPERTIES DISABLED true)
35
36
37
38
# For input file: cthead1.lsm
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x559652ac6cc0): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed..
39
set_tests_properties(action-itkfilters-level1-8 PROPERTIES DISABLED true)
40
41
42
43
# For input file: mini-complex-slow1.nrrd
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x55f942cacac0): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed.
44
set_tests_properties(action-itkfilters-level1-14 PROPERTIES DISABLED true)
45
46

if(WIN32)
Emmanuel Promayon's avatar
Emmanuel Promayon committed
47
48
49
50
51
    message(WARNING "Disabling test action-itkfilters-integration-test\n"
                    "Reason: WIN32 OpenGL failure on a VM\n"
                    "This test fails when run inside a VM due to OpenGL crash.\n"
                    "This test passes when run directly from a physical windows machine.\n")
    set_tests_properties(action-itkfilters-integration-test PROPERTIES DISABLED true)
52
endif()
53
54
55
56
57
58
59
60
61
62
63
64

if(NOT "${VTK_VERSION}" VERSION_EQUAL 6.3)
    message(WARNING "Disabling test action-itkfilters-integration-test\n"
                    "Reason: VTK version is not equals than 6.3\n"
                    "VTK 6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
                    "On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3.\n"
                    "Ubuntu 16.04 LTS is supported but these tests will fail if not disabled\n"
                    "VTK 7 has a different file format version, which is written in the header\n"
                    "On debian buster, the default VTK version is 7.1 not 6.3\n"
                    "Debian buster is supported but these tests will fail if not disabled\n")
    set_tests_properties(action-itkfilters-integration-test PROPERTIES DISABLED true)
endif()