Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates 20231020 #538

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Updates 20231020 #538

merged 2 commits into from
Oct 24, 2023

Conversation

louis-langholtz
Copy link
Owner

Description - What's this PR do?

  • Expands custom Real support with new CMake variables:
    • PLAYRHO_REAL_FETCH: names a package for CMake to fetch.
    • PLAYRHO_REAL_GIT_REPOSITORY: specifies git repository to fetch from.
    • PLAYRHO_REAL_GIT_TAG: specifies tag of git sources to actually get.
  • Various other changes:
    • Removes GetInvalid.
    • Enables compiling w/ realnumb external fixed point support.
    • Updates AlmostEqual to be more generic.
    • Updates AlmostEqual to use nextafter instead of epsilon.
    • Explicitly states in code more of the requirements on Real.

Test Info

Used the following command line invocation of CMake with these changes and confirmed compile & reasonable behavior of unit tests:

CC=/opt/homebrew/opt/llvm/bin/clang \
CXX=/opt/homebrew/opt/llvm/bin/clang++ \
LDFLAGS='-L/opt/homebrew/opt/llvm/lib/c++' \
cmake -S PlayRho -B PlayRhoBuild \
	-DPLAYRHO_BUILD_UNIT_TESTS=ON \
	-DPLAYRHO_BUILD_BENCHMARK=ON \
	-DPLAYRHO_BUILD_TESTBED=ON \
	-DPLAYRHO_BUILD_HELLOWORLD=ON \
	-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
	-DPLAYRHO_BUILD_DOC=ON \
	-DPLAYRHO_ENABLE_BOOST_UNITS=ON \
	-DPLAYRHO_REAL_TYPE='::realnumb::fixed64' \
	-DPLAYRHO_REAL_INCLUDE='#include <realnumb/fixed.hpp>;#include <realnumb/fixed_math.hpp>;#include <realnumb/fixed_limits.hpp>' \
	-DPLAYRHO_REAL_FETCH=realnumb \
	-DPLAYRHO_REAL_GIT_REPOSITORY=https://github.com/louis-langholtz/realnumb.git \
	-DPLAYRHO_REAL_GIT_TAG=main  \
	-DPLAYRHO_INSTALL=ON \
	-DREALNUMB_INSTALL=ON

Related Issues

- PLAYRHO_REAL_FETCH: names a package for CMake to fetch.
- PLAYRHO_REAL_GIT_REPOSITORY: specifies git repository to fetch from.
- PLAYRHO_REAL_GIT_TAG: specifies tag of git sources to actually get.
@louis-langholtz louis-langholtz added Enhancement For suggestions or changes that enhance any part of the project and isn't a bug. CMake Use to associate with the CMake tool. Library For issues that effect the library and aren't specific to any particular application. labels Oct 24, 2023
@louis-langholtz louis-langholtz added this to the 2.0 Release milestone Oct 24, 2023
@louis-langholtz louis-langholtz self-assigned this Oct 24, 2023
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

- Removes GetInvalid.
- Enables compiling w/ realnumb external fixed point support.
- Updates AlmostEqual to be more generic.
- Updates AlmostEqual to use nextafter instead of epsilon.
- Explicitly states in code more of the requirements on Real.

Tested with:
CC=/opt/homebrew/opt/llvm/bin/clang \
CXX=/opt/homebrew/opt/llvm/bin/clang++ \
LDFLAGS='-L/opt/homebrew/opt/llvm/lib/c++' \
cmake -S PlayRho -B PlayRhoBuild \
	-DPLAYRHO_BUILD_UNIT_TESTS=ON \
	-DPLAYRHO_BUILD_BENCHMARK=ON \
	-DPLAYRHO_BUILD_TESTBED=ON \
	-DPLAYRHO_BUILD_HELLOWORLD=ON \
	-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
	-DPLAYRHO_BUILD_DOC=ON \
	-DPLAYRHO_ENABLE_BOOST_UNITS=ON \
	-DPLAYRHO_REAL_TYPE='::realnumb::fixed64' \
	-DPLAYRHO_REAL_INCLUDE='#include <realnumb/fixed.hpp>;#include <realnumb/fixed_math.hpp>;#include <realnumb/fixed_limits.hpp>' \
	-DPLAYRHO_REAL_FETCH=realnumb \
	-DPLAYRHO_REAL_GIT_REPOSITORY=https://github.com/louis-langholtz/realnumb.git \
	-DPLAYRHO_REAL_GIT_TAG=main  \
	-DPLAYRHO_INSTALL=ON \
	-DREALNUMB_INSTALL=ON
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@coveralls
Copy link

Coverage Status

coverage: 99.205%. remained the same when pulling 5b327ac on updates-20231020 into d07ab4a on master.

@louis-langholtz louis-langholtz merged commit e23479d into master Oct 24, 2023
15 checks passed
@louis-langholtz louis-langholtz deleted the updates-20231020 branch October 24, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Use to associate with the CMake tool. Enhancement For suggestions or changes that enhance any part of the project and isn't a bug. Library For issues that effect the library and aren't specific to any particular application.
Development

Successfully merging this pull request may close these issues.

2 participants