From 421c4f2fb54dc1d1a984eb81109e290d847dab69 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 29 Jan 2025 13:47:09 -0700 Subject: [PATCH] Fix CMake to use user input, and default value as TCP. --- core/federated/RTI/CMakeLists.txt | 4 +++- network/impl/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/federated/RTI/CMakeLists.txt b/core/federated/RTI/CMakeLists.txt index a7d26f553..c3b5f28b1 100644 --- a/core/federated/RTI/CMakeLists.txt +++ b/core/federated/RTI/CMakeLists.txt @@ -34,7 +34,9 @@ if (NOT DEFINED LOG_LEVEL) set(LOG_LEVEL 0) ENDIF(NOT DEFINED LOG_LEVEL) -set(COMM_TYPE TCP) +if(NOT DEFINED COMM_TYPE) + set(COMM_TYPE "TCP") +endif() IF(CMAKE_BUILD_TYPE MATCHES DEBUG) # Set the LOG_LEVEL to 4 to get DEBUG messages diff --git a/network/impl/CMakeLists.txt b/network/impl/CMakeLists.txt index e9863d980..225edf3d5 100644 --- a/network/impl/CMakeLists.txt +++ b/network/impl/CMakeLists.txt @@ -11,7 +11,7 @@ target_sources(lf-network-impl PUBLIC if(COMM_TYPE MATCHES TCP) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src/lf_socket_support.c) else() - message(FATAL_ERROR "Your communication type is not supported! The C target supports TCP, MQTT and SST.") + message(FATAL_ERROR "Your communication type is not supported! The C target supports TCP.") endif() # Link necessary libraries