From 1dacc648a0ddc20679b6242bc94edb9ae657a247 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 9 Oct 2012 04:13:04 -0400 Subject: Made the warnings given by cmake for not having the dependencies for modules look less scary as they confuse dumb people currently --- cmake/Anope.cmake | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'cmake') diff --git a/cmake/Anope.cmake b/cmake/Anope.cmake index a9e7f6269..da8a88d54 100644 --- a/cmake/Anope.cmake +++ b/cmake/Anope.cmake @@ -359,12 +359,12 @@ macro(find_includes SRC INCLUDES) endmacro(find_includes) ############################################################################### -# calculate_depends( []) +# calculate_depends( []) # # This macro is used in most of the src (sub)directories to calculate the # header file dependencies for the given source file. ############################################################################### -macro(calculate_depends SRC SKIP) +macro(calculate_depends SRC SKIP VERBOSE) # Temporarily set that we didn't get a 3rd argument before we actually check if we did get one or not set(CHECK_ANGLE_INCLUDES FALSE) # Check for a third argument @@ -402,14 +402,16 @@ macro(calculate_depends SRC SKIP) endif(FOUND_DEFAULT) endforeach(DEFAULT_INCLUDE_DIR) if(FOUND_IN_DEFAULTS EQUAL -1) - find_in_list(${ARGV2} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES) + find_in_list(${ARGV3} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES) if(FOUND_IN_INCLUDES EQUAL -1) - append_to_list(${ARGV2} "${FOUND_${FILENAME}_INCLUDE}") + append_to_list(${ARGV3} "${FOUND_${FILENAME}_INCLUDE}") endif(FOUND_IN_INCLUDES EQUAL -1) endif(FOUND_IN_DEFAULTS EQUAL -1) else(FOUND_${FILENAME}_INCLUDE) set(${SKIP} TRUE) - message("${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.") + if(VERBOSE) + message("${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.") + endif(VERBOSE) endif(FOUND_${FILENAME}_INCLUDE) endif(CHECK_ANGLE_INCLUDES) endif(QUOTE_TYPE STREQUAL "angle brackets") @@ -417,12 +419,12 @@ macro(calculate_depends SRC SKIP) endmacro(calculate_depends) ############################################################################### -# calculate_libraries( ) +# calculate_libraries( ) # # This macro is used in most of the module (sub)directories to calculate the # library dependencies for the given source file. ############################################################################### -macro(calculate_libraries SRC SKIP SRC_LDFLAGS EXTRA_DEPENDS) +macro(calculate_libraries SRC SKIP VERBOSE SRC_LDFLAGS EXTRA_DEPENDS) # Set up a temporary LDFLAGS for this file set(THIS_LDFLAGS "${LDFLAGS}") # Reset extra dependencies @@ -464,8 +466,10 @@ macro(calculate_libraries SRC SKIP SRC_LDFLAGS EXTRA_DEPENDS) else(FOUND_${LIBRARY}_LIBRARY) # Skip this file set(${SKIP} TRUE) - # In the case of the library not being found, we fatally error so CMake stops trying to generate - message("${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.") + if(VERBOSE) + # In the case of the library not being found, we fatally error so CMake stops trying to generate + message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.") + endif(VERBOSE) endif(FOUND_${LIBRARY}_LIBRARY) endforeach(LIBRARY) endforeach(REQUIRED_LIBRARY) -- cgit