summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Adam <zanchey@ucc.gu.uwa.edu.au>2017-11-24 07:50:14 (GMT)
committerDavid Adam <zanchey@ucc.gu.uwa.edu.au>2017-11-24 07:54:00 (GMT)
commitb31d5e1dfdea5abcf95de05baf7b0e53cc18937a (patch)
tree724d922bcb0f098b4a946d33eb8e12c1b5c50a8a /Modules
parent1f1c2a9fdf84e1fb6f3399f7f30ad8b7c8d8669d (diff)
downloadCMake-b31d5e1dfdea5abcf95de05baf7b0e53cc18937a.zip
CMake-b31d5e1dfdea5abcf95de05baf7b0e53cc18937a.tar.gz
CMake-b31d5e1dfdea5abcf95de05baf7b0e53cc18937a.tar.bz2
CheckIncludeFiles: improve warning for missing argument
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckIncludeFiles.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index 1a217b3..347231c 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -49,12 +49,14 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
elseif(CMAKE_CXX_COMPILER_LOADED)
set(_lang CXX)
else()
- message(FATAL_ERROR "CHECK_INCLUDE_FILES needs either C or CXX language enabled")
+ message(FATAL_ERROR "CHECK_INCLUDE_FILES needs either C or CXX language enabled.\n")
endif()
elseif("x${ARGN}" MATCHES "^xLANGUAGE;([a-zA-Z]+)$")
- set(_lang "${CMAKE_MATCH_1}")
+ set(_lang "${CMAKE_MATCH_1}")
+ elseif("x${ARGN}" MATCHES "^xLANGUAGE$")
+ message(FATAL_ERROR "No languages listed for LANGUAGE option.\nSupported languages: C, CXX.\n")
else()
- message(FATAL_ERROR "Unknown arguments:\n ${ARGN}\n")
+ message(FATAL_ERROR "Unknown arguments:\n ${ARGN}\n")
endif()
if(_lang STREQUAL "C")