File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,9 +344,18 @@ endif()
344344
345345
346346# Last because each of these has its own CMakeLists.txt which reloads/re-finds LLVM, thus resettings globals.
347- add_subdirectory (programming_examples )
348- add_subdirectory (programming_guide )
349- add_subdirectory (test )
347+ # The test/example/tutorial subdirectories' check-* lit targets depend on AIEPythonModules, so they
348+ # require the Python bindings. Gate them behind an option that is forced OFF when the bindings are
349+ # off (mirroring how AIE_ENABLE_BINDINGS_PYTHON itself is defined above), so the compiler can be
350+ # configured and built standalone with a single -DAIE_ENABLE_BINDINGS_PYTHON=OFF.
351+ cmake_dependent_option (AIE_INCLUDE_TESTS_AND_EXAMPLES
352+ "Build the test/example/tutorial subdirectories (require the Python bindings)" ON
353+ "AIE_ENABLE_BINDINGS_PYTHON" OFF )
354+ if (AIE_INCLUDE_TESTS_AND_EXAMPLES)
355+ add_subdirectory (programming_examples )
356+ add_subdirectory (programming_guide )
357+ add_subdirectory (test )
358+ endif ()
350359add_subdirectory (cmake/modules )
351360
352361get_filename_component (COMPILER_DIRECTORY ${CMAKE_CXX_COMPILER } DIRECTORY )
You can’t perform that action at this time.
0 commit comments