build: Only use response files to link (for perf reasons)

This commit is contained in:
Léo Lam 2021-07-21 21:12:21 +02:00
parent 39d81d6178
commit 1c8152de22
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.13)
project(uking CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_NINJA_FORCE_RESPONSE_FILE ON)
# Use response files when linking objects because of the large number of source files
set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS ON)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")