[libc][Obvious] Add target OSUtil tests only if the target OS/arch match.
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 22 Dec 2021 22:19:38 +0000 (22:19 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Wed, 22 Dec 2021 22:38:03 +0000 (22:38 +0000)
libc/test/src/__support/OSUtil/CMakeLists.txt
libc/test/src/__support/OSUtil/linux/CMakeLists.txt

index 494218b..c70fedf 100644 (file)
@@ -1,3 +1,5 @@
 add_libc_testsuite(libc_osutil_tests)
 
-add_subdirectory(linux)
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
+  add_subdirectory(${LIBC_TARGET_OS})
+endif()
index 7e2608e..bfb072c 100644 (file)
@@ -1 +1,3 @@
-add_subdirectory(x86_64)
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
+  add_subdirectory(${LIBC_TARGET_ARCHITECTURE})
+endif()