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

Windows: Take 2 #10

Merged
merged 8 commits into from
Apr 21, 2021
Merged

Windows: Take 2 #10

merged 8 commits into from
Apr 21, 2021

Conversation

Tobias-Fischer
Copy link
Contributor

@Tobias-Fischer Tobias-Fischer commented Apr 21, 2021

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@Tobias-Fischer
Copy link
Contributor Author

@conda-forge-admin, please rerender

conda-forge-linter and others added 2 commits April 21, 2021 04:45
@Tobias-Fischer
Copy link
Contributor Author

So it seems like this builds fine. It is based on #7. It creates and installs a cunit.lib, but not a cunit.dll. I'm not a Windows person and have no idea whether there should be a dll, too. I commented out some stuff in the CMakeLists.txt as it was throwing an error.

Could you have a look and let me know what you think @traversaro @wolfv?

@wolfv
Copy link
Member

wolfv commented Apr 21, 2021

I think we just have to turn this option on BUILD_SHARED_LIBS. I can push that change

project(CUnit LANGUAGES C)

# Export all symbols when building a DLL on MSVC
if(WIN32 AND MSVC AND BUILD_SHARED_LIBS)
Copy link
Member

Choose a reason for hiding this comment

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

@Tobias-Fischer here :)

@wolfv
Copy link
Member

wolfv commented Apr 21, 2021

thanks for picking this up, let's get it over the finish line this time :)

@wolfv
Copy link
Member

wolfv commented Apr 21, 2021

dll is built, but installed into lib, instead of bin. It should be installed into bin. I am checking.

@Tobias-Fischer
Copy link
Contributor Author

Do we have to comment the stuff in the CMakeLists back in?

@wolfv
Copy link
Member

wolfv commented Apr 21, 2021

ah, no I think pdb files are for debugging. I just changed RUNTIME DESTINATION from lib to bin. Let's see if that does the trick.

@traversaro
Copy link

The last problem is that the check for existence checks for libcunit.lib, but the default CMake convention for names of add_library(cunit) (or also find_library(cunit) ) is:

  • Unix : libcunit.<ext>
  • Windows: cunit.<ext>

@traversaro
Copy link

traversaro commented Apr 21, 2021

ah, no I think pdb files are for debugging. I just changed RUNTIME DESTINATION from lib to bin. Let's see if that does the trick.

FYI the DESTINATION argument is not required anymore since CMake 3.14 (see https://cmake.org/cmake/help/v3.14/command/install.html#targets). However, the default value uses CMAKE_INSTALL_LIBDIR (if GNUInstallDirs was previously included) that default to lib64 on non-Debian distros, so for conda-forge use is important to set it to lib explicitly.

@wolfv wolfv added the automerge Merge the PR when CI passes label Apr 21, 2021
@wolfv wolfv mentioned this pull request Apr 21, 2021
5 tasks
@github-actions github-actions bot merged commit cd69268 into conda-forge:master Apr 21, 2021
@github-actions
Copy link
Contributor

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

  • linter: passed
  • drone: passed
  • travis: passed
  • azure: passed

Thus the PR was passing and merged! Have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the PR when CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants