pybind11_stl_include.h 874 B

12345678910111213141516171819202122232425262728293031323334
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2020 by
  4. * The Salk Institute for Biological Studies
  5. *
  6. * Use of this source code is governed by an MIT-style
  7. * license that can be found in the LICENSE file or at
  8. * https://opensource.org/licenses/MIT.
  9. *
  10. ******************************************************************************/
  11. // Windows build needs a fix otherwise this compilation error occurs:
  12. // msys/mingw64/include/c++/10.2.0/cmath:1121:11: error: 'hypot' has not been declared in '::'
  13. #ifndef API_PYBIND_STL_INCLUDE
  14. #define API_PYBIND_STL_INCLUDE
  15. #ifdef _WIN64
  16. // fix for _hypot compilation issue
  17. #define _hypot hypot
  18. #include <cmath>
  19. #endif
  20. #ifdef _MSC_VER
  21. #undef HAVE_UNISTD_H
  22. #undef HAVE_SYS_TIME_H
  23. #endif
  24. #include "libs/pybind11/include/pybind11/stl.h"
  25. #ifndef _WIN64
  26. #undef _hypot
  27. #endif
  28. #endif