Repository navigation
Add MSVC STL vector-algorithm switch and VS2019/v142 support - #272
Merged
Merged
Conversation
- Add FREEIMAGE_MSVC_VECTOR_ALGORITHMS (default ON). When OFF, define _USE_STD_VECTOR_ALGORITHMS=0 for the library and, publicly, for C++ consumers, since MSVC requires the same value across linked translation units. - Add vs2019 (v142) and vs2022-v142 configure presets. - Make the installed CMake package record the producing MSVC version and refuse a static package when the consumer's MSVC is older, with repair instructions. The smoke project now enables CXX. - Add a windows-v142 CI job that builds with the v142 toolset and links the installed package with v142 and v143 consumers, plus a configure-time test for the mismatch diagnostics. - Document the option, v142 builds and the resulting LNK2019 symptom in the README.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the CMake pieces for building and consuming FreeImage with Visual Studio 2019 (v142) tools and for the MSVC STL vectorized-algorithm ABI setting (#266).
FREEIMAGE_MSVC_VECTOR_ALGORITHMS(default ON). OFF defines_USE_STD_VECTOR_ALGORITHMS=0for the library and, publicly, for C++ consumers; MSVC requires the same value in every linked translation unit.vs2019andvs2022-v142presets.windows-v142CI job: builds with v142, then links the installed package from v142 and v143 consumers.packaging/tests/test-msvc-compatibility.cmakechecks the diagnostics at configure time.LNK2019symptom.Tested on macOS only: configure and build with the option OFF (no effect off MSVC), 19/19 CTest tests pass, and the nine toolset-mismatch cases in
test-msvc-compatibility.cmakepass. The v142 presets and thewindows-v142job can only run on a Windows runner, so CI is the first real check of those.