From 6e2c6114f991b3b61887fd9d1b442623b4b03882 Mon Sep 17 00:00:00 2001 From: Dundar Goc Date: Wed, 22 Jun 2022 20:06:15 +0200 Subject: build: replace deprecated cmake features with their modern alternatives - Use DIRECTORY instead of PATH in get_filename_component - Use COMPILE_OPTIONS instead of COMPILE_FLAGS. COMPILE_FLAGS is treated as a single string while COMPILE_OPTIONS is a list, meaning that cmake will take care of any escaping and quoting automatically. --- test/includes/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/includes/CMakeLists.txt b/test/includes/CMakeLists.txt index 4d7e962fbd..b4da4c0611 100644 --- a/test/includes/CMakeLists.txt +++ b/test/includes/CMakeLists.txt @@ -16,7 +16,7 @@ endforeach() foreach(hfile ${PRE_HEADERS}) string(REGEX REPLACE ^pre/ post/ post_hfile ${hfile}) - get_filename_component(hdir ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile} PATH) + get_filename_component(hdir ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile} DIRECTORY) file(MAKE_DIRECTORY ${hdir}) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile} -- cgit