mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 01:55:20 +00:00
Silence ccache and clang warnings (#2209)
This commit is contained in:
parent
1f9739eed4
commit
ca3cc5cf03
@ -27,6 +27,7 @@ find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
LOG("Found ccache ${CCACHE_FOUND}")
|
||||
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_LINK ccache)
|
||||
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.
|
||||
else()
|
||||
add_compile_options(
|
||||
-Qunused-arguments
|
||||
-Wstrict-aliasing
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-unused-local-typedef
|
||||
@ -178,9 +180,6 @@ if(DEFINED ENV{DEBUG})
|
||||
add_definitions(-DDEBUG)
|
||||
WARNING_LOG("Setting DEBUG build")
|
||||
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)
|
||||
add_compile_options(
|
||||
-g
|
||||
@ -215,11 +214,8 @@ endif()
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
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)
|
||||
# TODO: Add something here?
|
||||
# It is unclear if AVX must be managed on Windows.
|
||||
else()
|
||||
add_compile_options(-march=x86-64 -mno-avx)
|
||||
endif()
|
||||
@ -376,9 +372,6 @@ if(WIN32)
|
||||
string(REGEX REPLACE "\\\\" "/" WINDOWS_DEP_DIR ${WINDOWS_DEP_DIR})
|
||||
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
|
||||
set(BZIP2_INCLUDE_DIR "${WINDOWS_DEP_DIR}/bzip2/local/include")
|
||||
set(BZIP2_LIBRARIES "${WINDOWS_DEP_DIR}/bzip2/local/lib/libbz2.lib")
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1aad215e8bf841bc8ed6321432dd3b1cb0fc7af1
|
||||
Subproject commit f4eeaf26a5368d704c71f9a32fee57a5c5ac89d1
|
Loading…
Reference in New Issue
Block a user