Skip to content

Commit

Permalink
move security flags change into projects' cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
AviaAv committed Oct 30, 2024
1 parent 4ce2041 commit 6b0b06a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CMake/external_fastdds.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ function(get_fastdds)
message(CHECK_PASS "Done")
endfunction()


pop_security_flags()

# Trigger the FastDDS build
get_fastdds()


push_security_flags()
4 changes: 4 additions & 0 deletions CMake/external_foonathan_memory.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ function(get_foonathan_memory)

endfunction()

pop_security_flags()

get_foonathan_memory()

push_security_flags()
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,12 @@ target_link_libraries( ${LRS_TARGET} PUBLIC rsutils )

if(BUILD_WITH_DDS)
if (CMAKE_SYSTEM MATCHES "Windows" OR CMAKE_SYSTEM MATCHES "Linux")

pop_security_flags()

message(STATUS "Building with FastDDS")
include(CMake/external_foonathan_memory.cmake)
include(CMake/external_fastdds.cmake)

target_link_libraries( ${LRS_TARGET} PRIVATE realdds )

push_security_flags()

else()
MESSAGE(STATUS "Turning off `BUILD_WITH_DDS` as it's only supported on Windows & Linux and not on ${CMAKE_SYSTEM}")
Expand Down
2 changes: 1 addition & 1 deletion third-party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ string(REPLACE ${PROJECT_SOURCE_DIR}/ "" _rel_path ${CMAKE_CURRENT_LIST_DIR})

add_subdirectory( "${CMAKE_CURRENT_LIST_DIR}/rsutils" )

pop_security_flags()
pop_security_flags() # remove security flags for third party, as we cannot guarantee their security enforcment

include(CMake/external_json.cmake)
# Add additional include directories to allow file to include rosbag headers
Expand Down

0 comments on commit 6b0b06a

Please sign in to comment.