-
Notifications
You must be signed in to change notification settings - Fork 94
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
Enabled CI MSVC build jobs. #80
base: main
Are you sure you want to change the base?
Conversation
bjornpiltz
commented
Oct 11, 2023
- Added a build matrix
- Installed Qt through jurplel/install-qt-action (allows for caching)
* Added a build matrix * Installed Qt through jurplel/install-qt-action (allows for caching)
Fix MSVC error due to WinDef.h redefining min/max.
Would you consider to add this line to your #idfef(MSVC) block to suppress all the "inconsistent dll linkage" warnings as proposed in PR
I agree that your ifdef(MSVC) is probably a better solution than the ifdef(WIN32) used in my PR. |
@dennis2society I fixed the 4996 warnings by defining CREATE_QGLVIEWER_DLL, which was missing. see 20f8aa5. As of now, building libQLViewer as a DLL is hard coded in the cmake system. It's up to @GillesDebunne to decide if the possibility to build it as a static library should be reintroduced. Let me know if there is something else essential in your PR which is still missing (I think we can wait with fixing warnings and whitespace issues) otherwise this PR replaces #71 and #79. |
You're right. I've looked at the output of your CI run and it looks fine. Possibly I have double-fixed this issue in my PR. I will test again with your CMakelists. |
I think I'd prefer not to add #76 to keep this PR minimal. Anyway, I think a cleaner implementation would be: if(QGLVIEWER_BUILD_EXAMPLES)
add_subdirectory(examples) # details in examples/CMakeLists.txt
endif() Perhaps @fghoussen can resubmit once this gets merged. |
Sure! |
I have tested your CMakeLists and it works fine for me. Suppressing the 4996 warnings on Windows is not necessary. I will close my own PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake explicitly recommends to set the minimum version before the project name. Could you move the line
cmake_minimum_required(VERSION 3.16)
above the project() line?
@dennis2society, I'm hesitant to do so since I don't understand the changes made in "Minor tweaks in cmake configuration" cmake_minimum_required(VERSION 3.0)
project(libQGLViewer LANGUAGES CXX VERSION 2.9.1) @fghoussen, I'm hoping Gilles will merge this PR - then you would need to amend your branch to resolve the conflicts with my changes. |
@bjornpiltz The reason I am suggesting this is this warning when running cmake:
Not sure about the CMake version requirements, though. |
OK! |