Cleanup CMake (output)
authorDominik Schmidt <dev@dominik-schmidt.de>
Tue, 13 Nov 2018 20:01:23 +0000 (12:01 -0800)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:23 +0000 (10:58 +0100)
src/libsync/vfs/CMakeLists.txt
test/nextcloud_add_test.cmake

index d2aa9abcc4a0e66063c319dcb3872f9107782928..ee1d1dbb49bb8179bcbfb0dc342bdd9891f8be07 100644 (file)
@@ -1,14 +1,16 @@
-list(APPEND vfsPlugins "suffix")
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/win")
-    list(APPEND vfsPlugins "win")
-endif()
+file(GLOB vfsPlugins RELATIVE ${CMAKE_CURRENT_LIST_DIR} "*")
 
 foreach(vfsPlugin ${vfsPlugins})
-    message(STATUS "Add vfsPlugin in dir: ${vfsPlugin}")
+    if(NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/${vfsPlugin}")
+        continue()
+    endif()
+
     add_subdirectory("${vfsPlugin}")
 
     if(UNIT_TESTING AND IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/${vfsPlugin}/test")
-        message(STATUS "Add vfsPlugin tests in dir: ${vfsPlugin}")
         add_subdirectory("${vfsPlugin}/test" "${vfsPlugin}_test")
+        message(STATUS "Added vfsPlugin with tests: ${vfsPlugin}")
+    else()
+        message(STATUS "Added vfsPlugin without tests: ${vfsPlugin}")
     endif()
 endforeach()
index 24e6a5b5da423d432469c9b329c48dbb6194a246..1cfeec83210aea8399754ca7932d15eebe4baa78 100644 (file)
@@ -21,7 +21,6 @@ macro(nextcloud_add_test test_class additional_cpp)
 
     add_definitions(-DOWNCLOUD_TEST)
     add_definitions(-DOWNCLOUD_BIN_PATH="${CMAKE_BINARY_DIR}/bin")
-    message(STATUS "Add test: ${OWNCLOUD_TEST_CLASS}Test")
     add_test(NAME ${OWNCLOUD_TEST_CLASS}Test
         COMMAND ${OWNCLOUD_TEST_CLASS}Test
         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/bin")