[Liblas-commits] hg: Always use W4 warnings level for Visual Studio
- helps to ca...
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Aug 25 18:31:51 EDT 2010
changeset 30eae0160989 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=30eae0160989
summary: Always use W4 warnings level for Visual Studio - helps to catch portability issues
diffstat:
CMakeLists.txt | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r f4bf40539852 -r 30eae0160989 CMakeLists.txt
--- a/CMakeLists.txt Wed Aug 25 08:12:37 2010 -0500
+++ b/CMakeLists.txt Wed Aug 25 23:31:37 2010 +0100
@@ -82,6 +82,13 @@
add_definitions(-D_CRT_NONSTDC_NO_WARNING)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
endif()
+
+ if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+ string(REGEX REPLACE "/W[0-4]" "/W4"
+ CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+ endif()
# Generate dot-user file with user-specific settings for Visual Studio project
set(MSVC_ENVIRONMENT_PATH "" CACHE STRING
More information about the Liblas-commits
mailing list