mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-23 05:46:11 +01:00
44722f9ed3
This also goes for pkg-config installed by our CMake installation. This includes * Updating CMake version on Travis * Adding a `Catch2` subfolder to the `single_include/` folder to provide this include path both _inside_ the repository, and _outside_. * Updated examples to build with the new paths * Other general CMake cleanup
27 lines
1.2 KiB
CMake
27 lines
1.2 KiB
CMake
#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()
|