mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Remove file list checking from CMake
I do not think we need a safeguard against not including files in CMake anymore, and as it is, it caused annoying false positive about the default main implementation.
This commit is contained in:
		| @@ -1,30 +1,3 @@ | ||||
| #checks that the given hard-coded list contains all headers + sources in the given folder | ||||
| function(CheckFileList LIST_VAR FOLDER) | ||||
|   set(MESSAGE " should be added to the variable ${LIST_VAR}") | ||||
|   set(MESSAGE "${MESSAGE} in ${CMAKE_CURRENT_LIST_FILE}\n") | ||||
|   file(GLOB GLOBBED_LIST "${FOLDER}/*.cpp" | ||||
|                          "${FOLDER}/*.hpp" | ||||
|                          "${FOLDER}/*.h") | ||||
|   list(REMOVE_ITEM GLOBBED_LIST ${${LIST_VAR}}) | ||||
|   foreach(EXTRA_ITEM ${GLOBBED_LIST}) | ||||
|     string(REPLACE "${CATCH_DIR}/" "" RELATIVE_FILE_NAME "${EXTRA_ITEM}") | ||||
|     message(AUTHOR_WARNING "The file \"${RELATIVE_FILE_NAME}\"${MESSAGE}") | ||||
|   endforeach() | ||||
| endfunction() | ||||
|  | ||||
| function(CheckFileListRec LIST_VAR FOLDER) | ||||
|   set(MESSAGE " should be added to the variable ${LIST_VAR}") | ||||
|   set(MESSAGE "${MESSAGE} in ${CMAKE_CURRENT_LIST_FILE}\n") | ||||
|   file(GLOB_RECURSE GLOBBED_LIST "${FOLDER}/*.cpp" | ||||
|                                  "${FOLDER}/*.hpp" | ||||
|                                  "${FOLDER}/*.h") | ||||
|   list(REMOVE_ITEM GLOBBED_LIST ${${LIST_VAR}}) | ||||
|   foreach(EXTRA_ITEM ${GLOBBED_LIST}) | ||||
|     string(REPLACE "${CATCH_DIR}/" "" RELATIVE_FILE_NAME "${EXTRA_ITEM}") | ||||
|     message(AUTHOR_WARNING "The file \"${RELATIVE_FILE_NAME}\"${MESSAGE}") | ||||
|   endforeach() | ||||
| endfunction() | ||||
|  | ||||
| include(CheckCXXCompilerFlag) | ||||
| function(add_cxx_flag_if_supported_to_targets flagname targets) | ||||
|     check_cxx_compiler_flag("${flagname}" HAVE_FLAG_${flagname}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský