Skip to content
  • David Gobbi's avatar
    14164: Fix incorrectly set VTK_HAS_STD_ISFINITE variable. · f808e0c6
    David Gobbi authored
    This change is necessary for compilation with gcc in C++11 mode.
    
    The check_symbol_exists() macro that we had been using to find
    std::isfinite, std::isnan, and std::isinf always failed, so it
    wasn't doing anything useful.  Both this macro and the newer
    check_cxx_symbol_exists() are unsuitable for std::isfinite etc.
    because these function might exist either as function templates,
    or as simple function overloads, depending on the compiler.
    
    As a side note, the existing checks for the c99 functions, e.g.
      cmake_symbol_exists(isnan "math.h" VTK_HAS_ISNAN)
    should instead use this:
      cmake_cxx_symbol_exists(isnan "cmath" VTK_HAS_ISNAN)
    because vtkMath.h includes cmath, not math.h, and on some systems
    math.h provides these function while cmath does not (or, cmath
    might only provide them within the std namespace).  In fact, most
    instances of cmake_symbol_exists() in VTK should be replaced by
    cmake_cxx_symbol_exists() when VTK adopts a more recent CMake.
    
    Change-Id: I1ef7cd4daa52067badb0928d01c3f8b22953c601
    f808e0c6