From 05959a1e31bbb1854c40954d467238406774e159 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 15 Oct 2024 23:28:07 +0200 Subject: [PATCH] iox-#1176 Fix ACL feature flag for cmake builds --- iceoryx_platform/CMakeLists.txt | 6 ++++-- .../freertos/cmake/IceoryxPlatformDeployment.cmake | 10 +++------- .../linux/cmake/IceoryxPlatformDeployment.cmake | 12 ++---------- .../mac/cmake/IceoryxPlatformDeployment.cmake | 10 +++------- .../qnx/cmake/IceoryxPlatformDeployment.cmake | 12 ++---------- .../unix/cmake/IceoryxPlatformDeployment.cmake | 10 +++------- .../win/cmake/IceoryxPlatformDeployment.cmake | 10 +++------- 7 files changed, 20 insertions(+), 50 deletions(-) diff --git a/iceoryx_platform/CMakeLists.txt b/iceoryx_platform/CMakeLists.txt index bd164328dd..16ca2f2da8 100644 --- a/iceoryx_platform/CMakeLists.txt +++ b/iceoryx_platform/CMakeLists.txt @@ -73,10 +73,12 @@ file ( GLOB_RECURSE ICEORYX_PLATFORM_FILES ${ICEORYX_PLATFORM}/source/*.cpp ) - -set(ACL_LIB) if(IOX_PLATFORM_FEATURE_ACL) + set(IOX_CFG_FEATURE_ACL "1") set(ACL_LIB acl) +else() + set(IOX_CFG_FEATURE_ACL "0") + set(ACL_LIB) endif() iox_add_library( diff --git a/iceoryx_platform/freertos/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/freertos/cmake/IceoryxPlatformDeployment.cmake index 65349ced5a..2269926447 100644 --- a/iceoryx_platform/freertos/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/freertos/cmake/IceoryxPlatformDeployment.cmake @@ -34,15 +34,11 @@ configure_option( DEFAULT_VALUE "/tmp/" ) -configure_option( - NAME IOX_PLATFORM_FEATURE_ACL - DEFAULT_VALUE OFF -) +option(IOX_PLATFORM_FEATURE_ACL "Use ACLs for access control" OFF) +message(STATUS "[i] IOX_PLATFORM_FEATURE_ACL: ${IOX_PLATFORM_FEATURE_ACL}") if(IOX_PLATFORM_FEATURE_ACL) - message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") -else() - set(IOX_CFG_FEATURE_ACL "0") + message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") endif() message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/linux/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/linux/cmake/IceoryxPlatformDeployment.cmake index 8b695eb8fe..703ec07e86 100644 --- a/iceoryx_platform/linux/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/linux/cmake/IceoryxPlatformDeployment.cmake @@ -34,15 +34,7 @@ configure_option( DEFAULT_VALUE "/tmp/" ) -configure_option( - NAME IOX_PLATFORM_FEATURE_ACL - DEFAULT_VALUE ON -) - -if(IOX_PLATFORM_FEATURE_ACL) - set(IOX_CFG_FEATURE_ACL "1") -else() - set(IOX_CFG_FEATURE_ACL "0") -endif() +option(IOX_PLATFORM_FEATURE_ACL "Use ACLs for access control" ON) +message(STATUS "[i] IOX_PLATFORM_FEATURE_ACL: ${IOX_PLATFORM_FEATURE_ACL}") message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/mac/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/mac/cmake/IceoryxPlatformDeployment.cmake index 65349ced5a..2269926447 100644 --- a/iceoryx_platform/mac/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/mac/cmake/IceoryxPlatformDeployment.cmake @@ -34,15 +34,11 @@ configure_option( DEFAULT_VALUE "/tmp/" ) -configure_option( - NAME IOX_PLATFORM_FEATURE_ACL - DEFAULT_VALUE OFF -) +option(IOX_PLATFORM_FEATURE_ACL "Use ACLs for access control" OFF) +message(STATUS "[i] IOX_PLATFORM_FEATURE_ACL: ${IOX_PLATFORM_FEATURE_ACL}") if(IOX_PLATFORM_FEATURE_ACL) - message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") -else() - set(IOX_CFG_FEATURE_ACL "0") + message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") endif() message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/qnx/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/qnx/cmake/IceoryxPlatformDeployment.cmake index ee40a79203..e47bba68fa 100644 --- a/iceoryx_platform/qnx/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/qnx/cmake/IceoryxPlatformDeployment.cmake @@ -34,15 +34,7 @@ configure_option( DEFAULT_VALUE "/tmp/" ) -configure_option( - NAME IOX_PLATFORM_FEATURE_ACL - DEFAULT_VALUE ON -) - -if(IOX_PLATFORM_FEATURE_ACL) - set(IOX_CFG_FEATURE_ACL "1") -else() - set(IOX_CFG_FEATURE_ACL "0") -endif() +option(IOX_PLATFORM_FEATURE_ACL "Use ACLs for access control" ON) +message(STATUS "[i] IOX_PLATFORM_FEATURE_ACL: ${IOX_PLATFORM_FEATURE_ACL}") message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/unix/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/unix/cmake/IceoryxPlatformDeployment.cmake index 65349ced5a..2269926447 100644 --- a/iceoryx_platform/unix/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/unix/cmake/IceoryxPlatformDeployment.cmake @@ -34,15 +34,11 @@ configure_option( DEFAULT_VALUE "/tmp/" ) -configure_option( - NAME IOX_PLATFORM_FEATURE_ACL - DEFAULT_VALUE OFF -) +option(IOX_PLATFORM_FEATURE_ACL "Use ACLs for access control" OFF) +message(STATUS "[i] IOX_PLATFORM_FEATURE_ACL: ${IOX_PLATFORM_FEATURE_ACL}") if(IOX_PLATFORM_FEATURE_ACL) - message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") -else() - set(IOX_CFG_FEATURE_ACL "0") + message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") endif() message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/win/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/win/cmake/IceoryxPlatformDeployment.cmake index 7bb4f51261..963774e9b7 100644 --- a/iceoryx_platform/win/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/win/cmake/IceoryxPlatformDeployment.cmake @@ -35,15 +35,11 @@ configure_option( DEFAULT_VALUE "" ) -configure_option( - NAME IOX_PLATFORM_FEATURE_ACL - DEFAULT_VALUE OFF -) +option(IOX_PLATFORM_FEATURE_ACL "Use ACLs for access control" OFF) +message(STATUS "[i] IOX_PLATFORM_FEATURE_ACL: ${IOX_PLATFORM_FEATURE_ACL}") if(IOX_PLATFORM_FEATURE_ACL) - message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") -else() - set(IOX_CFG_FEATURE_ACL "0") + message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") endif() message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>")