Skip to content

Commit e7c532e

Browse files
authored
Merge branch 'borglab:develop' into develop
2 parents 140984d + d5f304e commit e7c532e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3063
-339
lines changed

.github/scripts/unix.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ function configure()
4545
-DGTSAM_BUILD_TESTS=${GTSAM_BUILD_TESTS:-OFF} \
4646
-DGTSAM_BUILD_UNSTABLE=${GTSAM_BUILD_UNSTABLE:-ON} \
4747
-DGTSAM_WITH_TBB=${GTSAM_WITH_TBB:-OFF} \
48-
-DGTSAM_BUILD_EXAMPLES_ALWAYS=${GTSAM_BUILD_EXAMPLES_ALWAYS:-ON} \
48+
-DGTSAM_BUILD_EXAMPLES_ALWAYS=${GTSAM_BUILD_EXAMPLES_ALWAYS:-OFF} \
4949
-DGTSAM_ALLOW_DEPRECATED_SINCE_V43=${GTSAM_ALLOW_DEPRECATED_SINCE_V43:-OFF} \
5050
-DGTSAM_USE_QUATERNIONS=${GTSAM_USE_QUATERNIONS:-OFF} \
5151
-DGTSAM_ROT3_EXPMAP=${GTSAM_ROT3_EXPMAP:-ON} \
5252
-DGTSAM_POSE3_EXPMAP=${GTSAM_POSE3_EXPMAP:-ON} \
5353
-DGTSAM_USE_SYSTEM_EIGEN=${GTSAM_USE_SYSTEM_EIGEN:-OFF} \
5454
-DGTSAM_USE_SYSTEM_METIS=${GTSAM_USE_SYSTEM_METIS:-OFF} \
55+
-DGTSAM_USE_BOOST_FEATURES=${GTSAM_USE_BOOST_FEATURES:-ON} \
56+
-DGTSAM_ENABLE_BOOST_SERIALIZATION=${GTSAM_ENABLE_BOOST_SERIALIZATION:-ON} \
5557
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF \
5658
-DGTSAM_SINGLE_TEST_EXE=OFF
5759
}
@@ -69,7 +71,6 @@ function finish ()
6971
# compile the code with the intent of populating the cache
7072
function build ()
7173
{
72-
export GTSAM_BUILD_EXAMPLES_ALWAYS=ON
7374
export GTSAM_BUILD_TESTS=OFF
7475

7576
configure
@@ -90,7 +91,6 @@ function build ()
9091
# run the tests
9192
function test ()
9293
{
93-
export GTSAM_BUILD_EXAMPLES_ALWAYS=OFF
9494
export GTSAM_BUILD_TESTS=ON
9595

9696
configure

.github/workflows/build-linux.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Linux CI
22

33
on: [pull_request]
44

5-
# Every time you make a push to your PR, it cancel immediately the previous checks,
6-
# and start a new one. The other runner will be available more quickly to your PR.
5+
# Every time you make a push to your PR, it cancel immediately the previous checks,
6+
# and start a new one. The other runner will be available more quickly to your PR.
77
concurrency:
88
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
99
cancel-in-progress: true
@@ -25,11 +25,12 @@ jobs:
2525
# Github Actions requires a single row to be added to the build matrix.
2626
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
2727
name: [
28-
ubuntu-20.04-gcc-9,
29-
ubuntu-20.04-clang-9,
30-
ubuntu-22.04-gcc-12,
31-
ubuntu-22.04-clang-14,
32-
]
28+
# "Bracket" the versions from GCC [9-14] and Clang [9-16]
29+
ubuntu-20.04-gcc-9,
30+
ubuntu-20.04-clang-9,
31+
ubuntu-24.04-gcc-14,
32+
ubuntu-24.04-clang-16,
33+
]
3334

3435
build_type: [Debug, Release]
3536
build_unstable: [ON]
@@ -44,15 +45,15 @@ jobs:
4445
compiler: clang
4546
version: "9"
4647

47-
- name: ubuntu-22.04-gcc-12
48-
os: ubuntu-22.04
48+
- name: ubuntu-24.04-gcc-14
49+
os: ubuntu-24.04
4950
compiler: gcc
50-
version: "11"
51+
version: "14"
5152

52-
- name: ubuntu-22.04-clang-14
53-
os: ubuntu-22.04
53+
- name: ubuntu-24.04-clang-16
54+
os: ubuntu-24.04
5455
compiler: clang
55-
version: "14"
56+
version: "16"
5657

5758
steps:
5859
- name: Checkout

.github/workflows/build-special.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Special Cases CI
22

33
on: [pull_request]
44

5-
# Every time you make a push to your PR, it cancel immediately the previous checks,
6-
# and start a new one. The other runner will be available more quickly to your PR.
5+
# Every time you make a push to your PR, it cancel immediately the previous checks,
6+
# and start a new one. The other runner will be available more quickly to your PR.
77
concurrency:
88
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
99
cancel-in-progress: true
@@ -34,6 +34,7 @@ jobs:
3434
ubuntu-clang-system-libs,
3535
ubuntu-no-boost,
3636
ubuntu-no-unstable,
37+
ubuntu-build-examples,
3738
]
3839

3940
build_type: [Debug, Release]
@@ -81,6 +82,12 @@ jobs:
8182
version: "14"
8283
flag: no_unstable
8384

85+
- name: ubuntu-build-examples
86+
os: ubuntu-22.04
87+
compiler: clang
88+
version: "14"
89+
flag: build_examples
90+
8491
steps:
8592
- name: Checkout
8693
uses: actions/checkout@v4
@@ -115,19 +122,24 @@ jobs:
115122
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
116123
fi
117124
118-
- name: Install Boost
119-
if: runner.os == 'Linux'
120-
run: |
121-
sudo apt-get -y install libboost-all-dev
122-
123125
- name: Install (macOS)
124126
if: runner.os == 'macOS'
125127
run: |
126-
brew install cmake ninja boost
128+
brew install cmake ninja
127129
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
128130
echo "CC=clang" >> $GITHUB_ENV
129131
echo "CXX=clang++" >> $GITHUB_ENV
130132
133+
- name: Install Boost
134+
run: |
135+
if [ ${{matrix.flag}} != 'no_boost' ]; then
136+
if [ ${{runner.os}} == 'Linux' ]; then
137+
sudo apt-get -y install libboost-all-dev
138+
elif [ ${{runner.os}} == 'macOS' ]; then
139+
brew install boost
140+
fi
141+
fi
142+
131143
- name: Set Allow Deprecated Flag
132144
if: matrix.flag == 'deprecated'
133145
run: |
@@ -153,6 +165,11 @@ jobs:
153165
echo "GTSAM_ROT3_EXPMAP=OFF" >> $GITHUB_ENV
154166
echo "GTSAM Uses Cayley map for Rot3"
155167
168+
- name: Build Examples
169+
if: matrix.flag == 'build_examples'
170+
run: |
171+
echo "GTSAM_BUILD_EXAMPLES_ALWAYS=ON" >> $GITHUB_ENV
172+
156173
- name: Use system versions of 3rd party libraries
157174
if: matrix.flag == 'system'
158175
run: |
@@ -181,7 +198,6 @@ jobs:
181198
with:
182199
swap-size-gb: 12
183200

184-
185201
- name: Build & Test
186202
run: |
187203
bash .github/scripts/unix.sh -t

Using-GTSAM-EXPORT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
To create a DLL in windows, the `GTSAM_EXPORT` keyword has been created and needs to be applied to different methods and classes in the code to expose this code outside of the DLL. However, there are several intricacies that make this more difficult than it sounds. In general, if you follow the following three rules, GTSAM_EXPORT should work properly. The rest of the document also describes (1) the common error message encountered when you are not following these rules and (2) the reasoning behind these usage rules.
44

55
## Usage Rules
6-
1. Put `GTSAM_EXPORT` in front of any function that you want exported in the DLL _if and only if_ that function is declared in a .cpp file, not just a .h file.
6+
1. Put `GTSAM_EXPORT` in front of any function that you want exported in the DLL _if and only if_ that function is defined in a .cpp file, not just a .h file.
77
2. Use `GTSAM_EXPORT` in a class definition (i.e. `class GSTAM_EXPORT MyClass {...}`) only if:
8-
* At least one of the functions inside that class is declared in a .cpp file and not just the .h file.
8+
* At least one of the functions inside that class is defined in a .cpp file and not just the .h file.
99
* You can `GTSAM_EXPORT` any class it inherits from as well. (Note that this implictly requires the class does not derive from a "header-only" class. Note that Eigen is a "header-only" library, so if your class derives from Eigen, _do not_ use `GTSAM_EXPORT` in the class definition!)
1010
3. If you have defined a class using `GTSAM_EXPORT`, do not use `GTSAM_EXPORT` in any of its individual function declarations. (Note that you _can_ put `GTSAM_EXPORT` in the definition of individual functions within a class as long as you don't put `GTSAM_EXPORT` in the class definition.)
1111
4. For template specializations, you need to add `GTSAM_EXPORT` to each individual specialization.
@@ -28,7 +28,7 @@ But first, we need to understand exactly what `GTSAM_EXPORT` is. `GTSAM_EXPORT`
2828

2929
Rule #1 doesn't seem very bad, until you combine it with rule #2
3030

31-
***Compiler Rule #2*** Anything declared in a header file is not included in a DLL.
31+
***Compiler Rule #2*** Anything defined in a header file is not included in a DLL.
3232

3333
When these two rules are combined, you get some very confusing results. For example, a class which is completely defined in a header (e.g. Foo) cannot use `GTSAM_EXPORT` in its definition. If Foo is defined with `GTSAM_EXPORT`, then the compiler _must_ find Foo in a DLL. Because Foo is a header-only class, however, it can't find it, leading to a very confusing "I can't find this symbol" type of error. Note that the linker says it can't find the symbol even though the compiler found the header file that completely defines the class.
3434

0 commit comments

Comments
 (0)