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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safer adding of stb/ suffix to include directory. #2145

Merged
merged 2 commits into from Jan 14, 2020

Conversation

@rcurtin
Copy link
Member

rcurtin commented Jan 8, 2020

I noticed that people often get STB include bugs. This happens because the FindStbImage.cmake file will actually append stb/ to the end of the CMake variable representing the STB include path. When CMake reconfigures, it will append stb/ even if the include directory has already been found, so you can end up with STB include directories like /home/ryan/src/mlpack/build/deps/stb/stb/ which isn't correct.

So, I replaced that functionality with a regex that checks to see whether the include directory ends in stb, and only adds stb/ if that is not the case.

@MuLx10 let me know what you think of this. 馃憤

@zoq
zoq approved these changes Jan 9, 2020
Copy link
Member

zoq left a comment

Ohh, that's why starting with a clean build helped.

@mlpack-bot
mlpack-bot bot approved these changes Jan 10, 2020
Copy link

mlpack-bot bot left a comment

Second approval provided automatically after 24 hours. 馃憤

@rcurtin rcurtin merged commit 9d8a4a7 into mlpack:master Jan 14, 2020
17 of 18 checks passed
17 of 18 checks passed
Memory Checks Build finished.
Details
LaTeX Documentation Checks Build finished.
Details
Static Code Analysis Checks Build finished.
Details
Style Checks Build finished.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
mlpack.mlpack Build #20200108.7 succeeded
Details
mlpack.mlpack (Linux Julia) Linux Julia succeeded
Details
mlpack.mlpack (Linux Markdown) Linux Markdown succeeded
Details
mlpack.mlpack (Linux Plain) Linux Plain succeeded
Details
mlpack.mlpack (Linux Python27) Linux Python27 succeeded
Details
mlpack.mlpack (Linux Python37) Linux Python37 succeeded
Details
mlpack.mlpack (Windows VS14 Plain) Windows VS14 Plain succeeded
Details
mlpack.mlpack (Windows VS15 Plain) Windows VS15 Plain succeeded
Details
mlpack.mlpack (Windows VS16 Plain) Windows VS16 Plain succeeded
Details
mlpack.mlpack (macOS Julia) macOS Julia succeeded
Details
mlpack.mlpack (macOS Plain) macOS Plain succeeded
Details
mlpack.mlpack (macOS Python27) macOS Python27 succeeded
Details
mlpack.mlpack (macOS Python37) macOS Python37 succeeded
Details
@rcurtin rcurtin deleted the rcurtin:stb-cmake-fix branch Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.