[libc][Obvious] Use full path with cmake's if(EXISTS ...).
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 10 Jun 2020 22:06:50 +0000 (15:06 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Wed, 10 Jun 2020 22:08:00 +0000 (15:08 -0700)
That if(EXISTS ...) works only with full paths was missed in couple of
places a in recent cleanup.

libc/src/string/CMakeLists.txt
libc/test/config/linux/CMakeLists.txt

index 114fce7..47c34f1 100644 (file)
@@ -132,6 +132,6 @@ add_bzero(bzero MARCH native)
 # Add all other relevant implementations for the native target.
 # ------------------------------------------------------------------------------
 
-if(EXISTS ${LIBC_STRING_TARGET_ARCH})
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_STRING_TARGET_ARCH})
   include(${LIBC_STRING_TARGET_ARCH}/CMakeLists.txt)
 endif()
index caff2ef..fea3d0b 100644 (file)
@@ -1,5 +1,5 @@
 add_libc_testsuite(libc_linux_tests)
 
-if(EXISTS ${LIBC_TARGET_MACHINE})
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_MACHINE})
   add_subdirectory(${LIBC_TARGET_MACHINE})
 endif()