Commit 6fea458a authored by Mark Meredith's avatar Mark Meredith
Browse files

Set cpp_std=vc++latest on Windows

parent 5233c87b
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
import sys

from conans import ConanFile, Meson, tools


@@ -22,7 +24,8 @@ class CsgEbConan(ConanFile):

    def build(self):
        meson = Meson(self)
        meson.configure(build_folder="build")
        args = ["-Dcpp_std=vc++latest"] if sys.platform in ("win32", "cygwin") else []
        meson.configure(build_folder="build", args=args)
        meson.build()
        meson.meson_test(args=["--verbose", "--print-errorlog"])

+3 −2
Original line number Diff line number Diff line
@@ -2,10 +2,11 @@
#include "csg_types.hpp"

#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>

const double DEGREES_PER_RADIAN = 45 / std::atan(1);

namespace {

template <class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
@@ -145,7 +146,7 @@ double signed_distance_3d(const LinearExtrude &lin_ext, double xx, double yy,

double signed_distance_3d(const RotateExtrude &rot_ext, double xx, double yy,
                          double zz) {
  double tt = atan(yy / xx) * 180 / M_PI;
  double tt = atan(yy / xx) * DEGREES_PER_RADIAN;
  if ((xx < 0 && yy >= 0) || (xx < 0 && yy < 0))
    tt += 180; // Quadrants II & III
  else if (xx >= 0 && yy < 0)
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ test_csg = executable('unit_tests_csg',
  include_directories: [parser_inc],
  dependencies: [catch2, cgal],
  link_with: lib_csg_parser,
  override_options: 'cpp_std=c++2a',
)

test('unit_test_csg', test_csg)