summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
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")