[PATCH] D61387: [CMake] Cache result of CXXFeatureCheck

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 10:24:08 PDT 2019


compnerd added a comment.

In general, yes, these checks can be expensive.  I wish that there was a way to ensure that the naming of the features was consistent across all the projects so that the same tests do not need to be rerun.



================
Comment at: llvm/utils/benchmark/cmake/CXXFeatureCheck.cmake:56
     message("-- Performing Test ${FEATURE} -- success")
-    set(HAVE_${VAR} 1 PARENT_SCOPE)
+    set(HAVE_${VAR} On CACHE BOOL "CXX feature test")
     add_definitions(-DHAVE_${VAR})
----------------
Mind using `ON` here?


================
Comment at: llvm/utils/benchmark/cmake/CXXFeatureCheck.cmake:64
     endif()
+    set(HAVE_${VAR} Off CACHE BOOL "CXX feature test")
   endif()
----------------
Mind using `OFF` here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61387





More information about the llvm-commits mailing list