diff --git a/mlir/examples/transform/Ch2/lib/CMakeLists.txt b/mlir/examples/transform/Ch2/lib/CMakeLists.txt --- a/mlir/examples/transform/Ch2/lib/CMakeLists.txt +++ b/mlir/examples/transform/Ch2/lib/CMakeLists.txt @@ -1,14 +1,11 @@ -add_mlir_library( +# Outside examples, this should be `add_mlir_library`. +add_llvm_example_library( # Library called MyExtension. MyExtensionCh2 # Built from the following source files. MyExtension.cpp - # Do not make this part of the main library distribution. - # Needed for the example only. - EXCLUDE_FROM_LIBMLIR - # Make includes visible without top-level path. ADDITIONAL_HEADER_DIRS ${PROJECT_SOURCE_DIR}/examples/transform/Ch2/include diff --git a/mlir/examples/transform/Ch3/lib/CMakeLists.txt b/mlir/examples/transform/Ch3/lib/CMakeLists.txt --- a/mlir/examples/transform/Ch3/lib/CMakeLists.txt +++ b/mlir/examples/transform/Ch3/lib/CMakeLists.txt @@ -1,14 +1,11 @@ -add_mlir_library( +# Outside examples, this should be `add_mlir_library`. +add_llvm_example_library( # Library called MyExtension. MyExtensionCh3 # Built from the following source files. MyExtension.cpp - # Do not make this part of the main library distribution. - # Needed for the example only. - EXCLUDE_FROM_LIBMLIR - # Make includes visible without top-level path. ADDITIONAL_HEADER_DIRS ${PROJECT_SOURCE_DIR}/examples/transform/Ch3/include