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

Gate the library products behind CMake flags and some CMake cleanup #38

Merged
merged 10 commits into from
Oct 8, 2021

Conversation

imciner2
Copy link
Member

@imciner2 imciner2 commented May 6, 2021

When QDLDL is included in OSQP, only the object library is used and the libraries and executables can actually pose issues when compiling for embedded targets.

Also, cleanup the CMake file a little bit by exposing the other compile options using the CMake option command instead of directly setting the cache (since option will allow IDEs to see that they are options that the user can change/modify).

Also change the CMake variable that the unit tests are gated on to be unique to this project.

When QDLDL is included in OSQP, only the object library is used and
the libraries and executables can actually pose issues when compiling
for embedded targets.
This flag isn't as generic as the previosu one.
Since the unit tests use the static library, they can't be built
if we don't build the static library.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 175

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 170: 0.0%
Covered Lines: 87
Relevant Lines: 87

💛 - Coveralls

@coveralls
Copy link

coveralls commented Sep 30, 2021

Pull Request Test Coverage Report for Build 1292497484

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 1291160185: 0.0%
Covered Lines: 87
Relevant Lines: 87

💛 - Coveralls

@imciner2
Copy link
Member Author

@bstellato I have merged the recent changes into this PR so it is now ready for review.

@@ -87,14 +89,16 @@ jobs:
- name: Configure
shell: bash
working-directory: ${{ runner.workspace }}/build
run: cmake --warn-uninitialized -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDFLOAT=${{ matrix.float }} -DDLONG=${{ matrix.long }} -DUNITTESTS=ON -DCOVERAGE=OFF $GITHUB_WORKSPACE
run: cmake --warn-uninitialized -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DQDLDL_BUILD_SHARED_LIB=${{ matrix.shared }} -DQDLDL_BUILD_STATIC_LIB=${{ matrix.static }} -DDFLOAT=${{ matrix.float }} -DDLONG=${{ matrix.long }} -DQDLDL_UNITTESTS=ON -DCOVERAGE=OFF $GITHUB_WORKSPACE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about changing DFLOAT to FLOAT or QDLDL_FLOAT? The same comment applies to DLONG.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could, but that would also be a breaking change so we need to note it in the release notes if we want to do that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll do that in a new PR after this one so that it is more obvious we are making that change.

This really isn't useful, and we want to get rid of it in the external
interface as well.
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.

4 participants