Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Jammy.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN apt-get update && apt-get install -y wget gnupg && \

# Install Required Ubuntu Packages
RUN apt-get update && apt-get install --no-install-recommends -y iputils-ping \
build-essential gdb less udev zstd sudo libgomp1 python-is-python3 \
build-essential lld gdb less udev zstd sudo libgomp1 python-is-python3 \
Comment thread
ClayJay3 marked this conversation as resolved.
cmake git libgtk2.0-dev pkg-config libx264-dev libdrm-dev ssh \
libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev tzdata net-tools \
yasm libatlas-base-dev libpq-dev libpostproc-dev libusb-1.0-0-dev \
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/JetPack.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN apt-get update && apt-get install -y wget && \

# Install Required Ubuntu Packages
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential cmake git gdb file tar libatlas-base-dev apt-transport-https iputils-ping \
build-essential lld cmake git gdb file tar libatlas-base-dev apt-transport-https iputils-ping \
Comment thread
ClayJay3 marked this conversation as resolved.
libswresample-dev libcanberra-gtk3-module zstd less libx264-dev libdrm-dev python-is-python3 \
libeigen3-dev libglew-dev libgstreamer-plugins-base1.0-dev udev net-tools libssl-dev \
libgstreamer-plugins-good1.0-dev libgstreamer1.0-dev libgtk-3-dev libjpeg-dev sudo usbutils \
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"image": "ghcr.io/missourimrdt/autonomy-jammy:2025-11-06-19-13-36",
// "image": "ghcr.io/missourimrdt/autonomy-jetpack:2025-11-06-19-13-36",
// "build": {
// // "dockerfile": "Jammy.dockerfile"
// "dockerfile": "JetPack.dockerfile"
// "dockerfile": "Jammy.dockerfile"
// // "dockerfile": "JetPack.dockerfile"
Comment thread
ClayJay3 marked this conversation as resolved.
// },
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
49 changes: 49 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ project(Autonomy_Software VERSION 24.05.00 LANGUAGES C CXX CUDA)
## CMake Policies
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "Suppress developer warnings")

####################################################################################################################
## Performance Enhancements ##
####################################################################################################################

## Use LLD linker if available to save RAM and time during the linking phase
if(NOT MSVC)
add_link_options("-fuse-ld=lld")
endif()

## Enable Unity Builds to drastically reduce memory usage during compilation
set(CMAKE_UNITY_BUILD ON)
set(CMAKE_UNITY_BUILD_BATCH_SIZE 8) # Adjust batch size based on project size. Lower is less RAM usage but longer compile times.
Comment thread
ClayJay3 marked this conversation as resolved.

####################################################################################################################
## Options ##
####################################################################################################################
Expand Down Expand Up @@ -336,6 +349,18 @@ set(AUTONOMY_LIBRARIES Threads::Threads
)
target_link_libraries(${EXE_NAME} PRIVATE ${AUTONOMY_LIBRARIES})

# Add a precompiled header for the heaviest libraries to vastly reduce RAM usage
target_precompile_headers(${EXE_NAME} PRIVATE
<vector>
<string>
<memory>
<Eigen/Dense>
<pcl/point_cloud.h>
<pcl/point_types.h>
<torch/torch.h>
<opencv2/opencv.hpp>
)
Comment thread
ClayJay3 marked this conversation as resolved.

####################################################################################################################
## Installation and Tests ##
####################################################################################################################
Expand Down Expand Up @@ -368,6 +393,18 @@ if (BUILD_TESTS_MODE)

add_executable(${EXE_NAME}_UnitTests ${Runner_SRC} ${UTests_SRC} ${TEST_SRC})
target_link_libraries(${EXE_NAME}_UnitTests GTest::gtest GTest::gtest_main ${AUTONOMY_LIBRARIES})

# Apply precompiled headers to Unit Tests
target_precompile_headers(${EXE_NAME}_UnitTests PRIVATE
<vector>
<string>
<memory>
<Eigen/Dense>
<pcl/point_cloud.h>
<pcl/point_types.h>
<torch/torch.h>
<opencv2/opencv.hpp>
)
Comment thread
ClayJay3 marked this conversation as resolved.

foreach(test_file ${UTests_SRC})
get_filename_component(test_name ${test_file} NAME_WE)
Expand All @@ -382,6 +419,18 @@ if (BUILD_TESTS_MODE)
add_executable(${EXE_NAME}_IntegrationTests ${Runner_SRC} ${ITests_SRC} ${TEST_SRC})
target_link_libraries(${EXE_NAME}_IntegrationTests GTest::gtest GTest::gtest_main ${AUTONOMY_LIBRARIES})

# Apply precompiled headers to Integration Tests
target_precompile_headers(${EXE_NAME}_IntegrationTests PRIVATE
<vector>
<string>
<memory>
<Eigen/Dense>
<pcl/point_cloud.h>
<pcl/point_types.h>
<torch/torch.h>
<opencv2/opencv.hpp>
)
Comment thread
ClayJay3 marked this conversation as resolved.

foreach(test_file ${ITests_SRC})
get_filename_component(test_name ${test_file} NAME_WE)
add_test(NAME ITest_${test_name} COMMAND ${EXE_NAME}_IntegrationTests --gtest_filter=${test_name}Test*.* --timestamp=${CURRENT_TIMESTAMP})
Expand Down
Loading