Skip to content

Visual Studio 2010 Project Files #31

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

Merged
merged 3 commits into from
Feb 16, 2013
Merged

Conversation

rioki
Copy link
Contributor

@rioki rioki commented Feb 15, 2013

I added Visual Studio 2010 project files and fixed an issue with the MSC compiler.

Unfortunately MSC does not support C99 where snprintf was added to the
standard. As a workaround alias _snprint to snprintf.
@pjohnmeyer
Copy link
Member

I'll take a look at this later. I would just merge it now, but a few points / questions:

  • CMake "best practice" is to do out-of-source builds, so Disallow in-source builds with CMake. #23 will enforce that -- and .gitignore will not be necessary; if it's all the same to you I'm leaving that out.
  • I was going to eliminate all platform-specific project files, except in tags, in favor of the CMake file. Do you think that's a bad idea? (If so then obviously .gitignore comes back for Visual Studio temporary files.)
  • Regarding the snprintf problem, this actually makes me rethink my implementation on Changed sprintf to snprintf in MemoryOutStream::FormatToStream. #28. Perhaps I need to use format strings to limit the size instead and go back to sprintf.

Thanks.

@qdii
Copy link
Contributor

qdii commented Feb 15, 2013

Hey Patrick,
I just wanted to add my opinion to your second bullet point: I do think it is a bad idea to remove VS project files for reasons similar as those I stated in comments of 259cf50 regarding autoconf. Various reasons could push people away from CMake including not being familiar with it, CMake being buggy/unsupported on a given platform, or just laziness.
I do think CMake is a great tool and should be more used but not offering people alternatives will only result in less people using unittest++. In addition to that, there might already be distribution packages built around the current build systems (at least, the Gentoo ebuild uses autoconf), and deleting it will cause a lot more work to package maintainers or make it unavailable on a platform (if CMake is buggy).
On the other hand, I also understand that supporting many different build system is impractical, so my vote goes for officially supporting CMake and leave it to contributors to support other build systems if they need them.

@pjohnmeyer
Copy link
Member

This sounds like good advice @qdii, I had concerns about taking that path anyway. For the moment I'll accept this pull and then I'll probably rejigger some things in the near term.

pjohnmeyer added a commit that referenced this pull request Feb 16, 2013
Visual Studio 2010 Project Files
@pjohnmeyer pjohnmeyer merged commit dff0c44 into unittest-cpp:master Feb 16, 2013
@rioki
Copy link
Contributor Author

rioki commented Feb 16, 2013

My preference would be GYP. Have a central gyp file and build all projects (all VS flavors and any other, like make) from that. I would even go so far and keep the generated files in the source tree. But that is just my opinion.

@pjohnmeyer
Copy link
Member

I took a look at GYP and, personally, found it gross. ;) Not that CMake is a beautiful butterfly.

Soon I'll have my full test setup up and running and I'll be able to generate fresh project files CMake without leaving in the dependency on CMake.

@rioki
Copy link
Contributor Author

rioki commented Feb 22, 2013

Ok I don't know what part of GYP you found gross. I think it is a diamond in the rough, it is great... except it needs a full installation of python. Then again it was a while since I have seen CMake; may learn something.

@paleozogt
Copy link
Contributor

Aside from the problem of having Yet Another Meta Build System, GYP's own docs says this about its own objectives,

When in doubt, do what Chromium needs and don't worry about generalizing the solution.

While CMake is also gross in some sense (its language is pretty rough), it does some things really well and its intended to be a generalized solution. It's become somewhat of a standard solution.

@rioki
Copy link
Contributor Author

rioki commented Feb 24, 2013

It's become somewhat of a standard solution.

Can't argue with that.

pjohnmeyer added a commit that referenced this pull request Apr 4, 2015
Visual Studio 2010 Project Files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants