Skip to content

Conversation

@MuAlphaOmegaEpsilon
Copy link
Contributor

When trying to compile the library using CMake unity builds, the compiler errors out due to multiple duplicated function definitions.

This PR removes duplicated code to allow for unity builds to succeed by adhering to the one-definition-rule.

You can try this out with:

$ cmake -B build -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PACKAGES=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=100 -DCMAKE_CXX_FLAGS="-DBOOST_NO_CXX11_EXTERN_TEMPLATE"
...
$ cmake --build build

Prior to these changes, the build will break.

@huangminghuang huangminghuang merged commit 3cedbfa into objectcomputing:master Dec 4, 2025
3 checks passed
@MuAlphaOmegaEpsilon MuAlphaOmegaEpsilon deleted the odr-fixes branch December 10, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants