]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: Do not use COMPILE_LANGUAGE if configuring for MSVC 5783/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 23 Jan 2018 18:37:43 +0000 (12:37 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 23 Jan 2018 18:37:43 +0000 (12:37 -0600)
Closes #5782

cmake/macros/macro_deal_ii_add_library.cmake
cmake/macros/macro_deal_ii_insource_setup_target.cmake
cmake/macros/macro_deal_ii_setup_target.cmake

index c6a0c8bdca2079facf342527785f3d47cbb41511..dde147a6843ff76ffb692be34cc8d052b336542e 100644 (file)
@@ -40,7 +40,7 @@ MACRO(DEAL_II_ADD_LIBRARY _library)
       LINKER_LANGUAGE "CXX"
       )
 
-    IF(CMAKE_VERSION VERSION_LESS 3.9)
+    IF(CMAKE_VERSION VERSION_LESS 3.9 OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
 
       SET_TARGET_PROPERTIES(${_library}_${_build_lowercase} PROPERTIES
         COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
index fb19f757f51ef6bbffda0ebdb5f15b423ccac08e..5c0298d698befbe38f15d4785724058b04e3d562 100644 (file)
@@ -39,7 +39,7 @@ MACRO(DEAL_II_INSOURCE_SETUP_TARGET _target _build)
       ${DEAL_II_INCLUDE_DIRS}
     )
 
-  IF(CMAKE_VERSION VERSION_LESS 3.9)
+  IF(CMAKE_VERSION VERSION_LESS 3.9 OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
     SET_PROPERTY(TARGET ${_target} APPEND_STRING PROPERTY
       COMPILE_FLAGS " ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
       )
index 981b2ae8f662e31aa7408cd42d9c5696a7670f03..7e3c80c00db684ce609ae4d22307cf311ecaefaf 100644 (file)
@@ -110,7 +110,7 @@ MACRO(DEAL_II_SETUP_TARGET _target)
     LINK_FLAGS " ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
     )
 
-  IF(CMAKE_VERSION VERSION_LESS 3.9)
+  IF(CMAKE_VERSION VERSION_LESS 3.9 OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
     SET_PROPERTY(TARGET ${_target} APPEND_STRING PROPERTY
       COMPILE_FLAGS " ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
       )

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.