cmake: ignore more visual C warnings, don't feed DOS line endings to atf

pull/119/head
Dan Kegel 2017-06-05 10:22:38 -07:00
parent 26d9a81c9c
commit 347539ca87
1 changed files with 5 additions and 2 deletions

View File

@ -17,11 +17,14 @@ SET(abs_top_srcdir ${pkgconf_SOURCE_DIR})
CONFIGURE_FILE(libpkgconf/config.h.cmake.in libpkgconf/config.h @ONLY) CONFIGURE_FILE(libpkgconf/config.h.cmake.in libpkgconf/config.h @ONLY)
# Expand others # Expand others
FOREACH(file Kyuafile libpkgconf.pc tests/Kyuafile tests/test_env.sh) 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() ENDFOREACH()
IF (WIN32) 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() ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -std=gnu99") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -std=gnu99")
ENDIF() ENDIF()