clang.toolchain 709 B

12345678910111213141516
  1. set(CMAKE_C_COMPILER clang-14)
  2. set(CMAKE_CXX_COMPILER clang++-14)
  3. set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld -rdynamic")
  4. set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld")
  5. set(CMAKE_C_STANDARD_LIBRARIES "-lc -lm")
  6. set(CMAKE_CXX_STANDARD_LIBRARIES "-lc -lm")
  7. if (CCACHE_PATH)
  8. set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PATH}" CACHE STRING "C++ compiler launcher")
  9. set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PATH}" CACHE STRING "C compiler launcher")
  10. endif()
  11. set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -UNDEBUG" CACHE STRING "C++ compiler flags")
  12. set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -UNDEBUG" CACHE STRING "C compiler flags")
  13. set(ENV{CC} clang-14)
  14. set(ENV{CXX} clang++-14)