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

Assertive TinyOrmConfig.cmake breaks static builds #21

Closed
SchaichAlonso opened this issue Aug 17, 2023 · 9 comments · Fixed by #22
Closed

Assertive TinyOrmConfig.cmake breaks static builds #21

SchaichAlonso opened this issue Aug 17, 2023 · 9 comments · Fixed by #22
Labels
bug Something isn't working

Comments

@SchaichAlonso
Copy link
Contributor

When searching for a TinyORM installation via find_package(TinyORM), the TinyORMConfig.cmake script generated from cmake/TinyOrmConfig.cmake.in will assert on the existance of ${TinyORM_ROOT}/bin in line 21 of it's source script and store the result into a variable that isn't referenced by the find_package logic.

If a static-only TinyORM is installed, the corresponding path will not be created during installation as the static library resides in lib rather then bin, causing find_package invokations by consuming projects to fail.

@SchaichAlonso SchaichAlonso changed the title Assertive TinyOrmConfig breaks static builds Assertive TinyOrmConfig.cmake breaks static builds Aug 17, 2023
@silverqx silverqx added the bug Something isn't working label Aug 17, 2023
@silverqx
Copy link
Owner

I want to ask, are these static builds working? I don't mean installation but if you can execute it correctly and on what OS are you building?

@SchaichAlonso
Copy link
Contributor Author

I'm not sure about TinyORM's primary ORM capabilities, but the querybuilder works in static linkage mode... on Debian, Manjaro, and FreeBSD.

I'll try Windows later

@silverqx
Copy link
Owner

Great to hear, the querybuilder is most important. The ORM is header only so that should be ok too but in C++ anything can happen.

@silverqx
Copy link
Owner

silverqx commented Aug 17, 2023

Also, I don't personally use static builds but always shared.

@SchaichAlonso
Copy link
Contributor Author

static builds of TinyORM work on windows, too (requires #18 though, as a linker warning breaks the build due to /WX)

@silverqx
Copy link
Owner

I have tried CMake static build with Qt6 msvc now and I was successful, no fails.

@silverqx
Copy link
Owner

Tried with BUILD_SHARED_LIBS=OFF, TOM_EXAMPLE=ON, BUILD_TESTS=ON, MYSQL_PING=ON, also all tests passed so this should be ok.

@SchaichAlonso
Copy link
Contributor Author

I have tried CMake static build with Qt6 msvc now and I was successful, no fails.

I'm not getting any warnings on my workstation either, however I'm seeing them occur on the github runners.

Appearently the warnings are gone on github, too, after updating TinyORM from 0.33.0 to 0.34.0 .

silverqx pushed a commit that referenced this issue Aug 22, 2023
Do not fail if `${TinyORM_ROOT}/bin`doesn't exist.

`bin` is only generated if a dynamic target is installed, and
the result variable isn't used even if TinyORM installs a
dynamic library.

Fixes #21
@silverqx
Copy link
Owner

Thank you, merged, also pls merge PR-s to the develop branch rather than the main branch.

SchaichAlonso added a commit to PurpleFlowerGarden/vcpkg that referenced this issue Sep 11, 2023
SchaichAlonso added a commit to PurpleFlowerGarden/vcpkg that referenced this issue Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants