]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Respect CMAKE_TOOLCHAIN_FILE when trying to enable C and Fortran
authorMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 31 Oct 2013 09:15:03 +0000 (09:15 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 31 Oct 2013 09:15:03 +0000 (09:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@31493 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_enable_language_optional.cmake

index fccb978ae428c08c9b4a1fe79ae2d41712476a1d..05400c5c55fd9bb6c17c48d1d56d87a1a32460b7 100644 (file)
@@ -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}

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.