Merge topic 'FortranCInterface-MinGW'

4cb73c4 FortranCInterface: Work around mingw32-make trouble with parens
This commit is contained in:
David Cole 2011-12-16 10:11:53 -05:00 committed by CMake Topic Stage
commit 7e6c8edb15
1 changed files with 8 additions and 0 deletions

View File

@ -116,6 +116,14 @@ endforeach()
#-----------------------------------------------------------------------------
set(FortranCInterface_SOURCE_DIR ${CMAKE_ROOT}/Modules/FortranCInterface)
# MinGW's make tool does not always like () in the path
if("${CMAKE_GENERATOR}" MATCHES "MinGW" AND
"${FortranCInterface_SOURCE_DIR}" MATCHES "[()]")
file(COPY ${FortranCInterface_SOURCE_DIR}/
DESTINATION ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterfaceMinGW)
set(FortranCInterface_SOURCE_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterfaceMinGW)
endif()
# Create the interface detection project if it does not exist.
if(NOT FortranCInterface_BINARY_DIR)
set(FortranCInterface_BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterface)