Skip to content

Commit

Permalink
Fix configure error on Linux with DCMTK_ENABLE_CXX11 enabled
Browse files Browse the repository at this point in the history
Configuring on Linux with DCMTK_ENABLE_CXX11 enabled generates an error in the
configuration step:

    CMake Error at CMake/GenerateDCMTKConfigure.cmake:1252 (MESSAGE):
      ...
      /path/to/dcmtk/config/tests/../math.cc:88:12: error:
      '::isnan' has not been declared

           return ::isnan(f);

One way around this is to ensure that the preferred std::isnan() function is
used instead. This commit fixes the following error in the check for that
function by specifying the double overload:

    FAILED: CMakeFiles/cmTC_62c88.dir/CheckSymbolExists.cxx.o
    /path/to/dcmtk-build/CMakeTmp/CheckSymbolExists.cxx:29:11: error: statement cannot resolve address of overloaded function
     std::isnan;return 0;
  • Loading branch information
msmolens committed Aug 1, 2017
1 parent e4df357 commit c9ccd45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMake/GenerateDCMTKConfigure.cmake
Expand Up @@ -571,8 +571,8 @@ ENDIF(WIN32 AND NOT CYGWIN)
CHECK_FUNCTIONWITHHEADER_EXISTS(isinf "${HEADERS}" HAVE_PROTOTYPE_ISINF)
CHECK_FUNCTIONWITHHEADER_EXISTS(isnan "${HEADERS}" HAVE_PROTOTYPE_ISNAN)
CHECK_FUNCTIONWITHHEADER_EXISTS(finite "${HEADERS}" HAVE_PROTOTYPE_FINITE)
CHECK_FUNCTIONWITHHEADER_EXISTS(std::isinf "${HEADERS}" HAVE_PROTOTYPE_STD__ISINF)
CHECK_FUNCTIONWITHHEADER_EXISTS(std::isnan "${HEADERS}" HAVE_PROTOTYPE_STD__ISNAN)
CHECK_FUNCTIONWITHHEADER_EXISTS("std::isinf(0.)" "${HEADERS}" HAVE_PROTOTYPE_STD__ISINF)
CHECK_FUNCTIONWITHHEADER_EXISTS("std::isnan(0.)" "${HEADERS}" HAVE_PROTOTYPE_STD__ISNAN)
CHECK_FUNCTIONWITHHEADER_EXISTS(std::finite "${HEADERS}" HAVE_PROTOTYPE_STD__FINITE)
CHECK_FUNCTIONWITHHEADER_EXISTS(flock "${HEADERS}" HAVE_PROTOTYPE_FLOCK)
CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME)
Expand Down

6 comments on commit c9ccd45

@fedorov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msmolens did you submit this patch to the DCMTK team?

cc: @michaelonken

@msmolens
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelonken
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Jan is responsible for the related code and returns from vacaction next week AFAIK)

@fedorov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jcfr please let me know how you want to proceed. I would like to update DCMTK to this commit: http://git.dcmtk.org/?p=dcmtk.git;a=commit;h=998058d4b1bff1066beb5caa01a90f7476ab8f34. Will you rebase this patched branch?

@jcfr
Copy link
Member

@jcfr jcfr commented on c9ccd45 Aug 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fedorov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jcfr

Please sign in to comment.