[PATCH] D71684: [SPECCPU2017] Add CXXPORTABILITY flags for 526.blender_r

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 18:30:30 PST 2019


ychen updated this revision to Diff 234997.
ychen added a comment.

Thanks for the feedback. Obviously, my CMake skills needs to catch up. My
intention was to add the macro definition only for CXX compilation, but
`add_definitions`, `add_compile_options` change both C and CXX flags AFAIK at
the time. After some digging, it seems `add_compile_options` and
`add_compile_definitions` support `cmake-generator-expressions` that could be
used to implement this perfectly. However, `add_compile_definitions` was not
available until CMake v3.12, so I use `add_compile_options` here.

N.B. The cmake generator expression used here is not supported for Visual
Studio generator


Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71684/new/

https://reviews.llvm.org/D71684

Files:
  External/SPEC/CFP2017rate/526.blender_r/CMakeLists.txt


Index: External/SPEC/CFP2017rate/526.blender_r/CMakeLists.txt
===================================================================
--- External/SPEC/CFP2017rate/526.blender_r/CMakeLists.txt
+++ External/SPEC/CFP2017rate/526.blender_r/CMakeLists.txt
@@ -6,15 +6,16 @@
 
 speccpu2017_benchmark(RATE)
 
-add_definitions(
+add_compile_options(
   -DGLEW_NO_ES
   -DGLEW_STATIC
   -DWITH_DNA_GHASH
   -DWITH_GL_PROFILE_COMPAT
   -DWITH_HEADLESS
   -DHAVE_UNSIGNED_CHAR
+  -funsigned-char
+  $<$<COMPILE_LANGUAGE:CXX>:-D__BOOL_DEFINED>
 )
-add_compile_options(-funsigned-char)
 speccpu2017_add_include_dirs(
   specrand
   blender/extern/binreloc/include


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71684.234997.patch
Type: text/x-patch
Size: 648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191221/2b2216a3/attachment.bin>


More information about the llvm-commits mailing list