Closed GoogleCodeExporter closed 8 years ago
yaml-cpp 0.2.5 compiled as static library incl. tools with VC++ 2005 and 2008
in conjunction with the patched CMakeLists.txt from trunk.
Older VC++ do not compile and give errors.
Original comment by matthias...@gmail.com
on 3 Jan 2011 at 9:31
The commands I used inside the yaml-cpp-0.2.5 folder:
* mkdir bin\vc2005
* cd bin\vc2005
* del /s /q * & rmdir /s /q .
* cmake -DBUILD_SHARED_LIBS=OFF -G "Visual Studio 8 2005" ..\..
* mkdir bin\vc2008
* cd bin\vc2008
* del /s /q * & rmdir /s /q .
* cmake -DBUILD_SHARED_LIBS=OFF -G "Visual Studio 9 2008" ..\..
Original comment by matthias...@gmail.com
on 3 Jan 2011 at 9:32
Updated patch to include format fixes and an additional conditionally set
definition (as preparation for correct Windows DLL compilation).
Original comment by matthias...@gmail.com
on 7 Jan 2011 at 10:33
I also had the need to link against shared runtime libraries in MSVC (/MT).
Attached is a completely overhauled CMakeLists.txt that supports all possible
types of MSVC runtime libraries.
Would be great to get comments on it.
Original comment by matthias...@gmail.com
on 9 Jan 2011 at 3:13
Thanks for these! I'm away from my main dev machines now, so I won't be able to
look at it for a little.
Original comment by jbe...@gmail.com
on 10 Jan 2011 at 5:24
Re-worked the CMakeLists.txt to make it cleaner and easier to re-use and
understand.
Original comment by matthias...@gmail.com
on 11 Jan 2011 at 10:26
Worked on another project with lots of build environments: Windows MinGW and
MSVC, Linux GCC and Mac OSX GCC. Plus building static and shared libraries (DLL
on Windows).
All new knowledge went into a new CMakeLists.txt, that provides several options
to configure the project file creation.
Original comment by matthias...@gmail.com
on 17 Jan 2011 at 8:27
Enhanced CMakeLists.txt even further to check for "-Wextra" support itself.
Works 100% withotu any option.
Original comment by matthias...@gmail.com
on 8 Feb 2011 at 10:45
Attachments:
Finally got around to merging this. Works great!
Original comment by jbe...@gmail.com
on 2 Mar 2011 at 4:41
I should mention, r432.
Original comment by jbe...@gmail.com
on 2 Mar 2011 at 4:41
Also, I just merged two changes from another contributor, Richard (from
branches/debuggable and branches/graphbuilder-api) in r434.
Both include small changes to the CMakeLists.txt file - in the graphbuilder
case, we just make the file globbing recursive, and in the debuggable case, he
wanted targets so he could write
make debuggable
or
make releasable
and it would switch between -O2 and -g options in gcc. I tried to emulate your
CMake style - could you take a peek and see if it looks OK?
Thanks so much for this!
Original comment by jbe...@gmail.com
on 2 Mar 2011 at 5:04
I think r434 looks ok, but will do some tests next weekend.
Just some comments:
* No flags for "MinSizeRel" (don't if this target makes any sense for yaml-cpp)
* Formatting: place "set(GCC_EXTRA_OPTIONS "")" below the code for
target-dependent CMAKE_CXX_FLAGS_<config>
It got splitted away from the rest.
And many thanks from Gerry and me, this will help us to keep YAML-CPP
up-to-date in the PinMAME project.
Original comment by matthias...@gmail.com
on 2 Mar 2011 at 7:10
OK, I fixed the formatting; with respect to the MinSizeRel, should I set it
with the "-Os" flag? Or just not set it at all?
Original comment by jbe...@gmail.com
on 2 Mar 2011 at 9:10
I think the "-Os" flag would be a good setting for MinSizeRel.
Original comment by matthias...@gmail.com
on 3 Mar 2011 at 7:37
Tested with MinGW 2 (gcc 3.2.3) and MinGW 5 (gcc 4.5.0).
Library builds fine with both.
Tools only build with MinGW 5 (gcc 4.5.0). This was also the case before, so no
issue.
But I found one new warning, a missing newline in the contrib source.
Patch is attached.
Original comment by matthias...@gmail.com
on 6 Mar 2011 at 10:50
Attachments:
Original issue reported on code.google.com by
matthias...@gmail.com
on 3 Jan 2011 at 8:05