From: Matthias Maier Date: Thu, 31 Oct 2013 09:15:03 +0000 (+0000) Subject: Bugfix: Respect CMAKE_TOOLCHAIN_FILE when trying to enable C and Fortran X-Git-Tag: v8.1.0~444 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a22a05f20b8857383c84e84b182ca37837d1642;p=dealii.git Bugfix: Respect CMAKE_TOOLCHAIN_FILE when trying to enable C and Fortran git-svn-id: https://svn.dealii.org/trunk@31493 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_enable_language_optional.cmake b/deal.II/cmake/macros/macro_enable_language_optional.cmake index fccb978ae4..05400c5c55 100644 --- a/deal.II/cmake/macros/macro_enable_language_optional.cmake +++ b/deal.II/cmake/macros/macro_enable_language_optional.cmake @@ -49,6 +49,10 @@ MACRO(ENABLE_LANGUAGE_OPTIONAL _language) "PROJECT(foobar ${_language})" ) + IF(NOT "${CMAKE_TOOLCHAIN_FILE}" STREQUAL "") + LIST(APPEND _hint "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}") + ENDIF() + EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${_hint} . WORKING_DIRECTORY ${_tmp}