Skip to content

Commit af3ae8c

Browse files
authored
Add flags for Windows ninja build to avoid too long command lines (#721)
1 parent 6cf49f7 commit af3ae8c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cmake/configure.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
include_guard()
22

3+
if(WIN32 AND CMAKE_GENERATOR MATCHES "Ninja")
4+
set(CMAKE_NINJA_FORCE_RESPONSE_FILE
5+
ON
6+
CACHE BOOL "Force Ninja to use response files" FORCE)
7+
set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES
8+
ON
9+
CACHE BOOL "Use response files for includes" FORCE)
10+
set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS
11+
ON
12+
CACHE BOOL "Use response files for objects" FORCE)
13+
set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES
14+
ON
15+
CACHE BOOL "Use response files for libraries" FORCE)
16+
endif()
17+
318
if(NOT CMAKE_BUILD_TYPE)
419
set(CMAKE_BUILD_TYPE "Release")
520
endif(NOT CMAKE_BUILD_TYPE)

0 commit comments

Comments
 (0)