[libc][NFC] Adjust some CMake messages for the GPU build
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 31 Mar 2023 12:28:08 +0000 (07:28 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 31 Mar 2023 12:28:44 +0000 (07:28 -0500)
Summary:
This disables the MPFR warning on the GPU since we can't support it
anyway. Also fixes a misspelled message.

libc/cmake/modules/prepare_libc_gpu_build.cmake
libc/utils/MPFRWrapper/CMakeLists.txt

index e8cf94c..d28cc3f 100644 (file)
@@ -21,7 +21,7 @@ if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND
         ${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "${req_ver}"))
   message(FATAL_ERROR "Cannot build libc for GPU. CMake compiler "
                       "'${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}' "
-                      " is not `Clang ${req_ver}.")
+                      " is not 'Clang ${req_ver}'.")
 endif()
 if(NOT LLVM_LIBC_FULL_BUILD)
   message(FATAL_ERROR "LLVM_LIBC_FULL_BUILD must be enabled to build libc for "
index 950b9b7..482c374 100644 (file)
@@ -20,6 +20,6 @@ if(LIBC_TESTS_CAN_USE_MPFR)
     target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
   endif()
   target_link_libraries(libcMPFRWrapper LibcFPTestHelpers LibcUnitTest mpfr gmp libc_test_utils)
-else()
+elseif(NOT LIBC_TARGET_ARCHITECTURE_IS_GPU)
   message(WARNING "Math tests using MPFR will be skipped.")
 endif()