Commit 1d0d6850 authored by Andy Cedilnik's avatar Andy Cedilnik

Simplify checking for headers

parent 5a08e1b6
#ifdef CHECK_INCLUDE_FILE
#include <${CHECK_INCLUDE_FILE_VAR}>
int main()
{
return 0;
}
#else /* CHECK_INCLUDE_FILE */
# error "CHECK_INCLUDE_FILE has to specify the include file"
#endif /* CHECK_INCLUDE_FILE */
......@@ -13,7 +13,6 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
TRY_COMPILE(COMPILE_OK
${PROJECT_BINARY_DIR}
${PROJECT_BINARY_DIR}/CheckIncludeFile.c
COMPILE_DEFINITIONS -DCHECK_INCLUDE_FILE="${INCLUDE}"
OUTPUT_VARIABLE OUTPUT)
IF(COMPILE_OK)
SET(${VARIABLE} ${COMPILE_OK})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment