Disable SubDirSpaces parens with GNU Make 3.82 (#11654)

GNU Make 3.82 incorrectly parses make dependencies involving parentheses
in path names.  See related upstream issue:

  http://savannah.gnu.org/bugs/?30612

Skip testing the ()-named subdirectory.
This commit is contained in:
Brad King 2011-01-11 10:01:30 -05:00
parent caa45a5f81
commit 19cb2ca47f
1 changed files with 9 additions and 1 deletions

View File

@ -13,7 +13,15 @@ set(CMAKE_PAREN TRUE)
IF("${CMAKE_MAKE_PROGRAM}" MATCHES "wmake")
message("wmake does not support () in path")
set(CMAKE_PAREN FALSE)
ENDIF("${CMAKE_MAKE_PROGRAM}" MATCHES "wmake")
elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "make")
execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} no_such_target --version
RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE out)
if("${out}" MATCHES "GNU Make 3.82")
# GNU Make 3.82 fails on parens: http://savannah.gnu.org/bugs/?30612
message(STATUS "GNU Make 3.82 sometimes fails on () in path")
set(CMAKE_PAREN FALSE)
endif()
endif()
IF(CMAKE_PAREN)
ADD_DEFINITIONS(-DCMAKE_PAREN=1)