From: Juan Ramos Date: Fri, 27 Jan 2023 22:42:49 +0000 (-0700) Subject: cmake: Cleanup BUILD_TESTS code X-Git-Tag: upstream/1.3.268~237 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=270c5451784b5f6dd064a1482d01ddaa5faa1c52;p=platform%2Fupstream%2FVulkan-Loader.git cmake: Cleanup BUILD_TESTS code --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 47473287..e972081c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,12 +29,6 @@ find_package(PythonInterp 3 QUIET) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) -option(BUILD_TESTS "Build Tests" OFF) - -if(BUILD_TESTS) - enable_testing() -endif() - if(APPLE) option(BUILD_STATIC_LOADER "Build a loader that can be statically linked" OFF) endif() @@ -293,6 +287,7 @@ endif() add_subdirectory(loader) +option(BUILD_TESTS "Build Tests") if(BUILD_TESTS) # Set gtest build configuration # Attempt to enable if it is available. @@ -394,7 +389,7 @@ if(BUILD_TESTS) endif() if (BUILD_TESTS) + enable_testing() add_subdirectory(tests) endif() - endif()