Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

disabled flag strict_aliasing #45

Merged
merged 1 commit into from
May 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ option(ENABLE_TESTING "Whether to turn unit test ON or OFF" ON)
option(ENABLE_UBSAN "Whether to turn Undefined Behavior Sanitizer ON or OFF" OFF)
option(ENABLE_FUZZ_TEST "Whether to turn Fuzz Test ON or OFF" OFF)
option(ENABLE_UPDATE "Whether to update common" OFF)
option(ENABLE_STRICT_ALIASING "Whether to turn strict-aliasing ON or OFF" OFF)

message(STATUS "ENABLE_ASAN: ${ENABLE_ASAN}")
message(STATUS "ENABLE_TESTING: ${ENABLE_TESTING}")
Expand Down Expand Up @@ -220,11 +221,16 @@ find_package(GPERF 2.8 REQUIRED)
find_package(Libunwind REQUIRED)
find_package(LZ4 MODULE)
find_package(LibLZMA MODULE)

if(NOT ENABLE_ASAN AND NOT ENABLE_NATIVE)
find_package(PCHSupport)
add_compile_options(-Winvalid-pch)
endif()

if(NOT ENABLE_STRICT_ALIASING)
add_compile_options(-fno-strict-aliasing)
endif()

find_package(nebula-common REQUIRED)

add_compile_options(-Wall)
Expand Down