Skip to content
Snippets Groups Projects
Commit 725dd86a authored by Andrew Maclean's avatar Andrew Maclean
Browse files

Fix command line is too long failure in Windows

parent d9cf7869
No related branches found
No related tags found
1 merge request!244Fix command line is too long failure in Windows
......@@ -138,6 +138,9 @@ else ()
message(STATUS "VTKWikiExamples: git lfs is installed.")
endif()
# Prevent a "command line is too long" failure in Windows.
set(CMAKE_NINJA_FORCE_RESPONSE_FILE "ON" CACHE BOOL "Force Ninja to use response files.")
message(STATUS "")
message(STATUS "Some tests will be excluded.")
include (${PROJECT_SOURCE_DIR}/src/ExcludedTests/ExcludedTests.cmake)
......
......@@ -10,7 +10,7 @@ find_package(VTK COMPONENTS ZZZ
if (NOT VTK_FOUND)
message("Skipping XXX: ${VTK_NOT_FOUND_MESSAGE}")
return ()
return()
endif()
message (STATUS "VTK_VERSION: ${VTK_VERSION}")
if (VTK_VERSION VERSION_LESS "8.90.0")
......@@ -18,8 +18,10 @@ if (VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
add_executable(XXX MACOSX_BUNDLE XXX.cxx )
target_link_libraries(XXX PRIVATE ${VTK_LIBRARIES})
else ()
else()
# include all components
# Prevent a "command line is too long" failure in Windows.
set(CMAKE_NINJA_FORCE_RESPONSE_FILE "ON" CACHE BOOL "Force Ninja to use response files.")
add_executable(XXX MACOSX_BUNDLE XXX.cxx )
target_link_libraries(XXX PRIVATE ${VTK_LIBRARIES})
# vtk_module_autoinit is needed
......@@ -27,7 +29,7 @@ else ()
TARGETS XXX
MODULES ${VTK_LIBRARIES}
)
endif ()
endif()
```
###Download and Build XXX
......
......@@ -81,6 +81,9 @@ if (VTK_VERSION VERSION_LESS "8.90.0")
endif()
target_link_libraries(XXX ${VTK_LIBRARIES})
else()
# include all components
# Prevent a "command line is too long" failure in Windows.
set(CMAKE_NINJA_FORCE_RESPONSE_FILE "ON" CACHE BOOL "Force Ninja to use response files.")
# CMAKE_AUTOMOC in ON so the MOC headers will be automatically wrapped.
add_executable(XXX MACOSX_BUNDLE
${CXX_FILES} ${UISrcs} ${QT_WRAP})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment