Skip to content

Commit

Permalink
CMake: Fix command line too long with Ninja/ARMClang on Windows
Browse files Browse the repository at this point in the history
The issue is reported in:
ARMmbed#14533

And relies on bugfix in newer cmake version:
https://gitlab.kitware.com/cmake/cmake/-/issues/21093
  • Loading branch information
ccli8 committed Feb 11, 2022
1 parent c6d814e commit 15579bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ endif()
if ("${CMAKE_GENERATOR}" MATCHES "Ninja")
# known issue ARMClang and Ninja with response files for windows
# https://gitlab.kitware.com/cmake/cmake/-/issues/21093
if((CMAKE_HOST_SYSTEM_NAME MATCHES "Windows" AND NOT CMAKE_CXX_COMPILER_ID MATCHES "ARMClang"))
# This gets fixed in newer cmake version
# https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6484
if((CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") AND ((${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.22.0") OR (NOT CMAKE_CXX_COMPILER_ID MATCHES "ARMClang")))
set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "")
endif()
endif()
Expand Down

0 comments on commit 15579bd

Please sign in to comment.