File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ endif()
4141
4242set (LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR} /../cmake)
4343
44+ option (OFFLOAD_INCLUDE_TESTS "Generate and build offload tests." ${LLVM_INCLUDE_TESTS} )
45+
4446# Add path for custom modules
4547list (INSERT CMAKE_MODULE_PATH 0
4648 "${CMAKE_CURRENT_SOURCE_DIR} /cmake"
@@ -376,15 +378,17 @@ add_subdirectory(libomptarget)
376378add_subdirectory (liboffload)
377379
378380# Add tests.
379- add_subdirectory (test )
381+ if (OFFLOAD_INCLUDE_TESTS)
382+ add_subdirectory (test )
380383
381- # Add unit tests if GMock/GTest is present
382- if (NOT LLVM_THIRD_PARTY_DIR)
383- set (LLVM_THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR} /../third-party" )
384- endif ()
385- if (EXISTS ${LLVM_THIRD_PARTY_DIR} /unittest AND NOT TARGET llvm_gtest)
386- add_subdirectory (${LLVM_THIRD_PARTY_DIR} /unittest ${CMAKE_CURRENT_BINARY_DIR} /third-party/unittest)
387- endif ()
388- if (TARGET llvm_gtest)
389- add_subdirectory (unittests)
384+ # Add unit tests if GMock/GTest is present
385+ if (NOT LLVM_THIRD_PARTY_DIR)
386+ set (LLVM_THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR} /../third-party" )
387+ endif ()
388+ if (EXISTS ${LLVM_THIRD_PARTY_DIR} /unittest AND NOT TARGET llvm_gtest)
389+ add_subdirectory (${LLVM_THIRD_PARTY_DIR} /unittest ${CMAKE_CURRENT_BINARY_DIR} /third-party/unittest)
390+ endif ()
391+ if (TARGET llvm_gtest)
392+ add_subdirectory (unittests)
393+ endif ()
390394endif ()
You can’t perform that action at this time.
0 commit comments