Skip to content

Commit 9f4c0cf

Browse files
committed
COMP: Fix compiler errors on Windows (MSVC)
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
1 parent 1d6a567 commit 9f4c0cf

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cmake_policy(SET CMP0057 NEW) # ``IN_LIST will be interpreted as an operator whe
44
cmake_policy(SET CMP0074 NEW) # ``find_package()`` uses ``<PackageName>_ROOT`` variables.
55
cmake_policy(SET CMP0077 NEW) # ``option()`` honors normal variables.
66
cmake_policy(SET CMP0080 NEW) # ``BundleUtilities`` cannot be included at configure time.
7-
cmake_policy(SET CMP0167 NEW) # Suppress FindBoost deprecation warning (retained for EbsdLib compatibility)
87

98
# The ``FindPythonInterp`` and ``FindPythonLibs`` modules are removed.
109
if(CMAKE_VERSION VERSION_GREATER "3.27.0")
@@ -16,6 +15,10 @@ if(CMAKE_VERSION VERSION_GREATER "3.28.0")
1615
cmake_policy(SET CMP0152 NEW)
1716
endif()
1817

18+
if(CMAKE_VERSION VERSION_GREATER "3.29.0")
19+
cmake_policy(SET CMP0167 NEW) # Suppress FindBoost deprecation warning (retained for EbsdLib compatibility)
20+
endif()
21+
1922
include(${CMAKE_CURRENT_LIST_DIR}/cmake/Utility.cmake)
2023

2124
include(CMakeDependentOption)

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ create_simplnx_plugin_unit_test(PLUGIN_NAME ${PLUGIN_NAME}
2727
# Realistic-data validation test (ComputeODFTest.cpp's [validation]-tagged
2828
# test) loads data/real_world_microtexture_data.dream3d through SimplnxCore's
2929
# ReadDREAM3DFilter, so we need its headers + link.
30-
target_link_libraries(${PLUGIN_NAME}UnitTest PRIVATE SimplnxCore)
30+
target_link_libraries(${PLUGIN_NAME}UnitTest PRIVATE SimplnxCore ${PLUGIN_NAME})
3131
target_include_directories(${PLUGIN_NAME}UnitTest PRIVATE
3232
${simplnx_SOURCE_DIR}/src/Plugins/SimplnxCore/src
3333
)

test/MTRSimTest.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <filesystem>
3131
#include <fstream>
3232
#include <vector>
33+
#include <numbers>
3334

3435
using namespace nx::core;
3536
using namespace nx::core::UnitTest;
@@ -202,8 +203,8 @@ TEST_CASE("MTRSim::MTRSimFilter: Execute wires simulation to output arrays", "[M
202203
REQUIRE(distinct >= 2);
203204

204205
// Euler values finite and within Bunge bounds (interleaved 3/voxel).
205-
constexpr float twoPi = 2.0f * static_cast<float>(M_PI);
206-
constexpr float pi = static_cast<float>(M_PI);
206+
constexpr float twoPi = 2.0f * std::numbers::pi_v<float>;
207+
207208
const auto& eulerStore = eulers.getDataStoreRef();
208209
for(usize t = 0; t < expectedTuples; ++t)
209210
{
@@ -216,7 +217,7 @@ TEST_CASE("MTRSim::MTRSimFilter: Execute wires simulation to output arrays", "[M
216217
REQUIRE(phi1 >= 0.0f);
217218
REQUIRE(phi1 <= twoPi);
218219
REQUIRE(Phi >= 0.0f);
219-
REQUIRE(Phi <= pi);
220+
REQUIRE(Phi <= std::numbers::pi_v<float>);
220221
REQUIRE(phi2 >= 0.0f);
221222
REQUIRE(phi2 <= twoPi);
222223
}

0 commit comments

Comments
 (0)