Permalink
Browse files

Fix configure error on Linux with DCMTK_ENABLE_CXX11 enabled

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 c9ccd45212cb542d78201995951fbcfb416f8b16
Showing with 2 additions and 2 deletions.
  1. +2 −2 CMake/GenerateDCMTKConfigure.cmake
@@ -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)

6 comments on commit c9ccd45

@fedorov

This comment has been minimized.

Show comment
Hide comment
@fedorov

fedorov Aug 15, 2017

Member

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

cc: @michaelonken

Member

fedorov replied Aug 15, 2017

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

cc: @michaelonken

@msmolens

This comment has been minimized.

Show comment
Hide comment
@msmolens

msmolens Aug 15, 2017

@fedorov Thanks, yes, the DCMTK team is aware of the patch: msmolens@c9ccd45#commitcomment-23467725

msmolens replied Aug 15, 2017

@fedorov Thanks, yes, the DCMTK team is aware of the patch: msmolens@c9ccd45#commitcomment-23467725

@michaelonken

This comment has been minimized.

Show comment
Hide comment
@michaelonken

michaelonken Aug 15, 2017

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

michaelonken replied Aug 15, 2017

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

@fedorov

This comment has been minimized.

Show comment
Hide comment
@fedorov

fedorov Aug 15, 2017

Member

👍

@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?

Member

fedorov replied Aug 15, 2017

👍

@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

This comment has been minimized.

Show comment
Hide comment
@fedorov

This comment has been minimized.

Show comment
Hide comment
@fedorov

fedorov Aug 15, 2017

Member

Thank you @jcfr

Member

fedorov replied Aug 15, 2017

Thank you @jcfr

Please sign in to comment.