Silence ccache and clang warnings (#2209)

This commit is contained in:
Teddy Reed 2016-06-30 18:41:32 -07:00 committed by GitHub
parent 1f9739eed4
commit ca3cc5cf03
2 changed files with 12 additions and 19 deletions

View File

@ -27,6 +27,7 @@ find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND) if(CCACHE_FOUND)
LOG("Found ccache ${CCACHE_FOUND}") LOG("Found ccache ${CCACHE_FOUND}")
LOG("Using ccache to speed up compilation") LOG("Using ccache to speed up compilation")
set(ENV{CCACHE_CPP2} "yes")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND) endif(CCACHE_FOUND)
@ -35,6 +36,7 @@ if(WIN32)
# TODO(#1985): We need to find the MSVC equivalents to the flags listed in the else section. # TODO(#1985): We need to find the MSVC equivalents to the flags listed in the else section.
else() else()
add_compile_options( add_compile_options(
-Qunused-arguments
-Wstrict-aliasing -Wstrict-aliasing
-Wno-missing-field-initializers -Wno-missing-field-initializers
-Wno-unused-local-typedef -Wno-unused-local-typedef
@ -178,9 +180,6 @@ if(DEFINED ENV{DEBUG})
add_definitions(-DDEBUG) add_definitions(-DDEBUG)
WARNING_LOG("Setting DEBUG build") WARNING_LOG("Setting DEBUG build")
elseif(DEFINED ENV{SANITIZE}) elseif(DEFINED ENV{SANITIZE})
# TODO(#1985): In the future, we need to find the MSVC equivalent flags for the following
# compiler flags.
# make sanitize (cannot make debug sanitize) # make sanitize (cannot make debug sanitize)
add_compile_options( add_compile_options(
-g -g
@ -215,11 +214,8 @@ endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(NOT DEFINED ENV{OPTIMIZED}) if(NOT DEFINED ENV{OPTIMIZED})
# TODO(#1985): Is there a congruent flag in MSVC for -mno-avx flag? I think it is implicit that the default
# does not use avx. Ideally, this should be kept WIN64 only but we are having trouble determining
# the target architecture
if(WIN32) if(WIN32)
# TODO: Add something here? # It is unclear if AVX must be managed on Windows.
else() else()
add_compile_options(-march=x86-64 -mno-avx) add_compile_options(-march=x86-64 -mno-avx)
endif() endif()
@ -376,9 +372,6 @@ if(WIN32)
string(REGEX REPLACE "\\\\" "/" WINDOWS_DEP_DIR ${WINDOWS_DEP_DIR}) string(REGEX REPLACE "\\\\" "/" WINDOWS_DEP_DIR ${WINDOWS_DEP_DIR})
set(BOOST_DEP_DIR "$ENV{HOMEDRIVE}/local/boost-msvc14") set(BOOST_DEP_DIR "$ENV{HOMEDRIVE}/local/boost-msvc14")
# TODO(#1988): All the paths used here are within third-party\. However, after chocolateyfication, these
# paths are subject to change.
# Win64 specific BZIP2 variables # Win64 specific BZIP2 variables
set(BZIP2_INCLUDE_DIR "${WINDOWS_DEP_DIR}/bzip2/local/include") set(BZIP2_INCLUDE_DIR "${WINDOWS_DEP_DIR}/bzip2/local/include")
set(BZIP2_LIBRARIES "${WINDOWS_DEP_DIR}/bzip2/local/lib/libbz2.lib") set(BZIP2_LIBRARIES "${WINDOWS_DEP_DIR}/bzip2/local/lib/libbz2.lib")

@ -1 +1 @@
Subproject commit 1aad215e8bf841bc8ed6321432dd3b1cb0fc7af1 Subproject commit f4eeaf26a5368d704c71f9a32fee57a5c5ac89d1