[Mlir-commits] [mlir] [MLIR] Set LLVM_LIT_ARGS in Standalone Example CMake (PR #152423)

Mehdi Amini llvmlistbot at llvm.org
Fri Aug 15 06:37:00 PDT 2025


================
@@ -8,6 +8,11 @@ set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   find_package(MLIR REQUIRED CONFIG)
 
+  # Explictily set LLVM_LIT_ARGS so that the in-tree test for this example
+  # will get the expected output regardless of the value of LLVM_LIT_ARGS
+  # in the main LLVM build.
+  set(LLVM_LIT_ARGS "")
+
----------------
joker-eph wrote:

```suggestion

    # Define the default argument to use by `lit` when testing.
 set(LLVM_LIT_ARGS "-sv" CACHE STRING "Default options for lit")

```

This makes it not specific to the test, and just generally good for the users of the template I think.

https://github.com/llvm/llvm-project/pull/152423


More information about the Mlir-commits mailing list