From c9914ecd01396529a88ebfb85c9e3aa6253ed86d Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Fri, 5 Jun 2020 14:02:43 +0200 Subject: [PATCH] programs: cmake: Fix relative path warnings The path to source files were relative which triggered warnings when generating the build system. Move to absolute paths based on CMAKE_CURRENT_SOURCE_DIR. Signed-off-by: Ronald Cron Signed-off-by: Gilles Peskine --- programs/ssl/CMakeLists.txt | 4 ++-- programs/test/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/ssl/CMakeLists.txt b/programs/ssl/CMakeLists.txt index 1460aa97c..b3ef4f8e9 100644 --- a/programs/ssl/CMakeLists.txt +++ b/programs/ssl/CMakeLists.txt @@ -38,7 +38,7 @@ add_executable(ssl_client1 ssl_client1.c) target_link_libraries(ssl_client1 ${libs}) add_executable(ssl_client2 ssl_client2.c) -target_sources(ssl_client2 PUBLIC query_config.c) +target_sources(ssl_client2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/query_config.c) target_link_libraries(ssl_client2 ${libs}) add_executable(ssl_fork_server ssl_fork_server.c) @@ -51,7 +51,7 @@ add_executable(ssl_server ssl_server.c) target_link_libraries(ssl_server ${libs}) add_executable(ssl_server2 ssl_server2.c) -target_sources(ssl_server2 PUBLIC query_config.c) +target_sources(ssl_server2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/query_config.c) target_link_libraries(ssl_server2 ${libs}) if(THREADS_FOUND) diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index 282ef58aa..5feb31773 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -28,7 +28,7 @@ add_executable(zeroize zeroize.c) target_link_libraries(zeroize ${libs}) add_executable(query_compile_time_config query_compile_time_config.c) -target_sources(query_compile_time_config PUBLIC ../ssl/query_config.c) +target_sources(query_compile_time_config PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ssl/query_config.c) target_link_libraries(query_compile_time_config ${libs}) install(TARGETS selftest benchmark udp_proxy query_compile_time_config