From 3df7f25ded94e9be9a665eee063de74a11eabdb1 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Sat, 2 May 2020 14:58:11 -0700 Subject: [PATCH] Test --- .azure-pipelines.yml | 2 +- CMakeLists.txt | 3 +++ unittests/unit/GeneratedWamIkFast.cpp | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 8fcc3967a4b38..e9f2b50cbe13a 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -99,6 +99,6 @@ jobs: mkdir build cd build cmake .. -G "$(CMAKE_GENERATOR)" -A x64 -DCMAKE_BUILD_TYPE=$(CONFIGURATION) -Wno-dev -T "v$(BUILD_TOOLSET_VERSION),host=x64" -DVCPKG_TARGET_TRIPLET=$(VCPKG_ARCH) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_INSTALL_ROOT)/scripts/buildsystems/vcpkg.cmake" -DCMAKE_INSTALL_PREFIX="$(Build.BinariesDirectory)/$(REPO_NAME)" -DDART_MSVC_DEFAULT_OPTIONS=ON -DDART_VERBOSE=ON - cmake --build . --target ALL_BUILD --config $(CONFIGURATION) -- /maxcpucount:4 + cmake --build . --target ALL_BUILD --config $(CONFIGURATION) displayName: 'Build' workingDirectory: '$(Build.SourcesDirectory)' diff --git a/CMakeLists.txt b/CMakeLists.txt index c872650d37ed4..1bea6a83732f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,6 +199,9 @@ if(MSVC) add_compile_options(/wd4305) add_compile_options(/wd4838) add_compile_options(/bigobj) + + add_compile_options(/wd4005) # TODO(JS): Check if necessary + add_compile_definitions(_ENABLE_EXTENDED_ALIGNED_STORAGE) elseif(CMAKE_COMPILER_IS_GNUCXX) diff --git a/unittests/unit/GeneratedWamIkFast.cpp b/unittests/unit/GeneratedWamIkFast.cpp index ed0a7f52a3813..1fad60c05e3c5 100644 --- a/unittests/unit/GeneratedWamIkFast.cpp +++ b/unittests/unit/GeneratedWamIkFast.cpp @@ -329,13 +329,13 @@ inline double IKatan2Simple(double fy, double fx) } inline double IKatan2(double fy, double fx) { - if (std::isnan(fy)) + if (isnan(fy)) { - IKFAST_ASSERT(!std::isnan( + IKFAST_ASSERT(!isnan( fx)); // if both are nan, probably wrong value will be returned return IKPI_2; } - else if (std::isnan(fx)) + else if (isnan(fx)) { return 0; } @@ -355,7 +355,7 @@ inline CheckValue IKatan2WithCheck(T fy, T fx, T epsilon) CheckValue ret; ret.valid = false; ret.value = 0; - if (!std::isnan(fy) && !std::isnan(fx)) + if (!isnan(fy) && !isnan(fx)) { if (IKabs(fy) >= IKFAST_ATAN2_MAGTHRESH || IKabs(fx) > IKFAST_ATAN2_MAGTHRESH) @@ -32374,7 +32374,7 @@ class IKSolver j11array[1] = -j11array[0]; sj11array[1] = -sj11array[0]; } - else if (std::isnan(cj11array[0])) + else if (isnan(cj11array[0])) { // probably any value will work j11valid[0] = true;