diff --git a/CMakeLists.txt b/CMakeLists.txt index f88806e71b6..7535d2c8b2f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,9 @@ endif() set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/lib") -project(migraphx) +project(migraphx LANGUAGES C CXX) +include(CTest) + find_package(ROCM REQUIRED) find_path(HALF_INCLUDE_DIR half.hpp PATH_SUFFIXES half) @@ -269,7 +271,9 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) add_subdirectory(src) add_subdirectory(docs) -add_subdirectory(test) +if(BUILD_TESTING) + add_subdirectory(test) +endif() add_subdirectory(tools) set(DEST_DIR ${CMAKE_BINARY_DIR}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5f9110a2d09..3663399788f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,8 +24,6 @@ cmake_policy(SET CMP0057 NEW) -include(CTest) - find_package(Threads REQUIRED) include(ProcessorCount) ProcessorCount(N)