From 347539ca87c1c009b993fed8c7f072c6ba7f4ce8 Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Mon, 5 Jun 2017 10:22:38 -0700 Subject: [PATCH] cmake: ignore more visual C warnings, don't feed DOS line endings to atf --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 742922f..cedd61c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,11 +17,14 @@ SET(abs_top_srcdir ${pkgconf_SOURCE_DIR}) CONFIGURE_FILE(libpkgconf/config.h.cmake.in libpkgconf/config.h @ONLY) # Expand others FOREACH(file Kyuafile libpkgconf.pc tests/Kyuafile tests/test_env.sh) - CONFIGURE_FILE(${file}.in ${file} @ONLY) + CONFIGURE_FILE(${file}.in ${file} @ONLY NEWLINE_STYLE UNIX) ENDFOREACH() IF (WIN32) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") + # Make warnings fatal... but ignore C4996: 'strdup' two different ways + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX /wd4996") + # Ignore warning C4996: 'strncpy' + ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS=1") ELSE() SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -std=gnu99") ENDIF()