Skip to content

Commit 1b6ad03

Browse files
committed
Move 4244 and 4267 MSVC warnings configuration to CMake
* Add 4244 and 4267 MSVC warnings configuration in CMake * Remove 4244 and 4267 MSVC warnings configuration from `pcl_macros.h` Signed-off-by: Ramir Sultanov <sumir0@proton.me>
1 parent 61492b6 commit 1b6ad03

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,9 @@ if(CMAKE_COMPILER_IS_MSVC)
187187
# /MANIFEST:NO") # please, don't disable manifest generation, otherwise crash at start for vs2008
188188

189189
# Disable some warnings
190+
# 4244 : conversion from 'type1' to 'type2', possible loss of data
190191
# 4661 : no suitable definition provided for explicit template instantiation request
191-
string(APPEND CMAKE_CXX_FLAGS " /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355 /wd4661")
192+
string(APPEND CMAKE_CXX_FLAGS " /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355 /wd4244 /wd4267 /wd4661")
192193

193194
# Enable warnings, which are disabled by default (see https://learn.microsoft.com/de-de/cpp/preprocessor/compiler-warnings-that-are-off-by-default)
194195
string(APPEND CMAKE_CXX_FLAGS " /w34265")

common/include/pcl/pcl_macros.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@
4848
#endif
4949

5050
#if defined _MSC_VER
51-
// 4244 : conversion from 'type1' to 'type2', possible loss of data
5251
// 4503 : decorated name length exceeded, name was truncated
5352
// 4146 : unary minus operator applied to unsigned type, result still unsigned
54-
#pragma warning (disable: 4018 4244 4267 4521 4251 4305 4503 4146)
53+
#pragma warning (disable: 4018 4521 4251 4305 4503 4146)
5554
#endif
5655

5756
#ifndef _USE_MATH_DEFINES

0 commit comments

Comments
 (0)