Skip to content

Commit

Permalink
[compiler-rt] Fix cmake warnings
Browse files Browse the repository at this point in the history
 - Fix cmake BOOL misspellings
 - Set cmake policy for CMP0075 to NEW

As requested by smeenai I've compared CMAkeCache.txt in master with and
without this patch and the only changes are to the variable types I fixed:

     $ diff build-b1-master/CMakeCache.txt build-b1-compiler-rt-fix-cmake-warnings/CMakeCache.txt
     503c503
     < COMPILER_RT_BAREMETAL_BUILD:STRING=OFF
     ---
     > COMPILER_RT_BAREMETAL_BUILD:BOOL=OFF
     550c550
     < COMPILER_RT_HWASAN_WITH_INTERCEPTORS:STRING=ON
     ---
     > COMPILER_RT_HWASAN_WITH_INTERCEPTORS:BOOL=ON

Patch by Wink Saville <wink@saville.com>.

Differential Revision: https://reviews.llvm.org/D61203

llvm-svn: 361866
  • Loading branch information
smeenai committed May 28, 2019
1 parent 272d70c commit 363079f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler-rt/CMakeLists.txt
Expand Up @@ -5,6 +5,10 @@

cmake_minimum_required(VERSION 3.4.3)

if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW)
endif()

# Check if compiler-rt is built as a standalone project.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
project(CompilerRT C CXX ASM)
Expand Down Expand Up @@ -61,10 +65,10 @@ if (NOT COMPILER_RT_ASAN_SHADOW_SCALE STREQUAL "")
-D${COMPILER_RT_ASAN_SHADOW_SCALE_DEFINITION})
endif()

set(COMPILER_RT_HWASAN_WITH_INTERCEPTORS ON CACHE BOOLEAN
set(COMPILER_RT_HWASAN_WITH_INTERCEPTORS ON CACHE BOOL
"Enable libc interceptors in HWASan (testing mode)")

set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN
set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL
"Build for a bare-metal target.")

if (COMPILER_RT_STANDALONE_BUILD)
Expand Down

0 comments on commit 363079f

Please sign in to comment.