From: Matthias Maier Date: Thu, 8 Sep 2016 19:55:54 +0000 (-0500) Subject: CMake: Bugfix: Throw a verbose error message instead of silently ignoring an argument X-Git-Tag: v8.5.0-rc1~654^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e320a35b4290bc51cf844ce721329aac9d71476;p=dealii.git CMake: Bugfix: Throw a verbose error message instead of silently ignoring an argument --- diff --git a/cmake/macros/macro_deal_ii_setup_target.cmake b/cmake/macros/macro_deal_ii_setup_target.cmake index f971888f99..c1c96942f8 100644 --- a/cmake/macros/macro_deal_ii_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_setup_target.cmake @@ -38,9 +38,8 @@ # "${DEAL_II_USER_DEFINITIONS};${DEAL_II_USER_DEFINITIONS_}" # # If no "DEBUG" or "RELEASE" keyword is specified after the target, the -# current CMAKE_BUILD_TYPE determines which compiler and linker flags as -# well as compile definitions to use and against which deal.II library it -# should be linked against. +# current CMAKE_BUILD_TYPE is used instead: Every build type that (case +# insensitively) matches "debug" is considered a debug build. # # If the requested build type is not available (e.g. DEBUG request but # deal.II was compiled with release mode only), the other available will be @@ -80,6 +79,11 @@ MACRO(DEAL_II_SETUP_TARGET _target) # IF("${ARGN}" MATCHES "^(DEBUG|RELEASE)$") SET(_build "${ARGN}") + ELSEIF(NOT "${ARGN}" STREQUAL "") + MESSAGE(FATAL_ERROR + "\nDEAL_II_SETUP_TARGET called with invalid second argument. + Valid arguments are (empty), DEBUG, or RELEASE\n\n" + ) ENDIF() #