Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-26 Thread Alexander Broekhuis
I accidentally send my mail direct, instead of to the list, so now to the
list again.


  Please do the smart thing and use them from the start. Saves you a lot
 of trouble later on. Using
  the FindModules probably makes the build work for more then 80% on
 other platforms from the start.
  Also using standard stuff gives you less custom CMake scripts to
 maintain.
 


 That's my plan, except when I find things that don't appear workable, such
 as no cmake-bundled FindXXX for some project.  (Over time maybe we need
 build up our own libraries, but I don't have enough time for that at
 present.)


Good to hear. In the case CMake doesn't have a bundled find file, often
something can be found on other projects. On the other hand, making an own
Find module is straightforward and simple if only the library and headers
are needed (most likely enough to start with).



 So far OpenSSL, Expat, and LibXml2 seem very easy to deal with on Windows
 based on the cmake-bundled FindXXX packages.


Good the hear, there is a big chance the CMake script will work on other
platforms as well.

Do you also intend to use CMake for project file generation?


-- 
Met vriendelijke groet,

Alexander Broekhuis


Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-22 Thread Jeff Trawick
On Wed, Aug 21, 2013 at 3:49 PM, William A. Rowe Jr. wr...@rowe-clan.netwrote:

 On Tue, 20 Aug 2013 15:47:46 -0400
 Jeff Trawick traw...@gmail.com wrote:

  I plan to spend some time tilting at that windmill starting later this
  week, for the purposes of getting a flexible build on Windows.
  Enough time to get something working?  Dunno :(

 Just FYI, RELWITHDEBINFO was a broken model, but that's the model we
 have always aimed for with separate .pdb symbol files for win builds.
 We want several things that the attached patch to cmake 2.8.7 addresses
 (it isn't the most elegant, but it works);

 * disable stack corruption^Woptimization so that user crash dumps
   with no debug info are still nominally decipherable

 * a release build is *never* incremental (duh)

 * /opt:ref to toss useless/unreferenced debug leftovers for release

 * there was a stupid bug where shared lib link flags in RELWITHDEBINFO
   inherited DEBUG model, not RELWITHDEBINFO model from exe link flags.

 I've never worked out how to propagate the actual .pdb file into the
 install lib/ or bin/ dir when performing the .exe / .dll install step.
 Hints on improving the patch would be great.



I guess all of this necessarily goes in the cmake backend, but possibly
with a knob in the APR spec to turn it on?


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/


Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-22 Thread William A. Rowe Jr.
The only toggle is to choose RelWithDebInfo as the cmake target (as opposed to 
Release or Debug).  Pretty straightforward.

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-22 Thread Tom Donovan
On 08/20/2013 03:47 PM, Jeff Trawick wrote:
 I plan to spend some time tilting at that windmill starting later this week, 
 for the purposes of
 getting a flexible build on Windows.  Enough time to get something working?  
 Dunno :(
 
 -- 
 Born in Roswell... married an alien...
 http://emptyhammock.com/

I gave it a try last March, but I never found the time to follow up and finish 
it.
I was able to build apr and httpd (trunk) on Windows7.

My Windows-only CMakeLists.txt files for both apr  httpd, along with some 
notes, are at:

   http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip

Please help yourself to anything here which is useful to your effort.

-t-


Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-22 Thread Jeff Trawick
On Thu, Aug 22, 2013 at 10:49 AM, Tom Donovan donov...@bellatlantic.netwrote:

 On 08/20/2013 03:47 PM, Jeff Trawick wrote:
  I plan to spend some time tilting at that windmill starting later this
 week, for the purposes of
  getting a flexible build on Windows.  Enough time to get something
 working?  Dunno :(
 
  --
  Born in Roswell... married an alien...
  http://emptyhammock.com/

 I gave it a try last March, but I never found the time to follow up and
 finish it.
 I was able to build apr and httpd (trunk) on Windows7.

 My Windows-only CMakeLists.txt files for both apr  httpd, along with some
 notes, are at:

http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip

 Please help yourself to anything here which is useful to your effort.

 -t-


Wow, you got pretty darn far!  (too bad you didn't go ahead and commit ;) )

I currently anticipate

* fixing a few basic issues in what I have soon and then committing
* subsequently pulling in chunks of your stuff as I understand it/can try
it out

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/


Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-22 Thread Jeff Trawick
On Thu, Aug 22, 2013 at 10:49 AM, Tom Donovan donov...@bellatlantic.netwrote:

 On 08/20/2013 03:47 PM, Jeff Trawick wrote:
  I plan to spend some time tilting at that windmill starting later this
 week, for the purposes of
  getting a flexible build on Windows.  Enough time to get something
 working?  Dunno :(
 
  --
  Born in Roswell... married an alien...
  http://emptyhammock.com/

 I gave it a try last March, but I never found the time to follow up and
 finish it.
 I was able to build apr and httpd (trunk) on Windows7.

 My Windows-only CMakeLists.txt files for both apr  httpd, along with some
 notes, are at:

http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip

 Please help yourself to anything here which is useful to your effort.

 -t-


Hi Tom,

By chance did you experiment with FindOpenSSL, FindZLIB, etc.?

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/


Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-22 Thread Tom Donovan
On 08/22/2013 04:55 PM, Jeff Trawick wrote:
 On Thu, Aug 22, 2013 at 10:49 AM, Tom Donovan donov...@bellatlantic.net
 mailto:donov...@bellatlantic.net wrote:
 
 On 08/20/2013 03:47 PM, Jeff Trawick wrote:
  I plan to spend some time tilting at that windmill starting later this 
 week, for the purposes of
  getting a flexible build on Windows.  Enough time to get something 
 working?  Dunno :(
 
  --
  Born in Roswell... married an alien...
  http://emptyhammock.com/
 
 I gave it a try last March, but I never found the time to follow up and 
 finish it.
 I was able to build apr and httpd (trunk) on Windows7.
 
 My Windows-only CMakeLists.txt files for both apr  httpd, along with 
 some notes, are at:
 
http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip
 
 Please help yourself to anything here which is useful to your effort.
 
 -t-
 
 
 Hi Tom,
 
 By chance did you experiment with FindOpenSSL, FindZLIB, etc.?
 
 -- 
 Born in Roswell... married an alien...
 http://emptyhammock.com/

Hi Jeff,

I looked at them briefly, but no, I didn't experiment much.

On Windows, those CMake modules seem to have an impossible job.  There is 
really no standard
location on Windows for OpenSSL, Zlib, et. al. - especially since headers are 
needed in addition to
the runtime libraries.   These modules pose a risk of finding some unrelated 
OpenSSL or Zlib library
which might have been built with a different Windows compiler, and might use a 
different C runtime
library.

I used my own rules instead to locate the eleven prerequisites that APR or 
HTTPD might use on
Windows.  The rules I made for PCRE, ICONV, LUA, LIBXML2 (or EXPAT), ZLIB, 
OPENSSL, SQLITE3, PGSQL,
MYSQL, ORACLE, and BDB (Berkeley DB) were:

*  If the symbol is defined on the CMake command-line, it points to the 
directory that the
prerequisite is installed in.  i.e. the directory containing bin, include, and 
lib subdirectories.

e.g.
CMAKE -D SQLITE3=C:/work/sqlite3 -D PCRE=D:/build/pcre  -D 
ICONV=C:/work/libiconv ...

*  If the symbol is not defined, a check is made for directories named:

srclib\pcre, srclib\libiconv, srclib\lua, srclib\libxml2, srclib\zlib, 
srclib\openssl,
srclib\sqlite3, srclib\postgresql, srclib\mysql, srclib\oracle, or 
srclib\berkeleydb.

*  If the symbol isn't defined and the srclib\XXX subdirectory doesn't exist - 
then the
prerequisite is not present.

-tom-



Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-21 Thread Jeff Trawick
On Tue, Aug 20, 2013 at 10:12 PM, William A. Rowe Jr.
wr...@rowe-clan.netwrote:

 On Tue, 20 Aug 2013 15:47:46 -0400
 Jeff Trawick traw...@gmail.com wrote:

  I plan to spend some time tilting at that windmill starting later this
  week, for the purposes of getting a flexible build on Windows.
  Enough time to get something working?  Dunno :(

 Feel free to attack it from either angle, once we have a unix or
 a windows starting point, the rest is straightforward.

 I've looked some at what it will take.  Was going to use what the
 pcre project has done as a starting point.


Yeah.  I had looked at that very briefly before, but after staring at that
some more today and spending a couple of hours starting a spec for APR
trunk, I'm very happy with my progress.  I hope to have the core library
and test suite building today.

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/


Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-21 Thread Alexander Broekhuis
If you need someone testing the CMake stuff, feel free to ping me. While I
don't have much time, I have experience with CMake in the Celix project.



2013/8/21 Jeff Trawick traw...@gmail.com

 On Tue, Aug 20, 2013 at 10:12 PM, William A. Rowe Jr. wr...@rowe-clan.net
  wrote:

 On Tue, 20 Aug 2013 15:47:46 -0400
 Jeff Trawick traw...@gmail.com wrote:

  I plan to spend some time tilting at that windmill starting later this
  week, for the purposes of getting a flexible build on Windows.
  Enough time to get something working?  Dunno :(

 Feel free to attack it from either angle, once we have a unix or
 a windows starting point, the rest is straightforward.

 I've looked some at what it will take.  Was going to use what the
 pcre project has done as a starting point.


 Yeah.  I had looked at that very briefly before, but after staring at that
 some more today and spending a couple of hours starting a spec for APR
 trunk, I'm very happy with my progress.  I hope to have the core library
 and test suite building today.


 --
 Born in Roswell... married an alien...
 http://emptyhammock.com/




-- 
Met vriendelijke groet,

Alexander Broekhuis


Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-21 Thread William A. Rowe Jr.
On Tue, 20 Aug 2013 15:47:46 -0400
Jeff Trawick traw...@gmail.com wrote:

 I plan to spend some time tilting at that windmill starting later this
 week, for the purposes of getting a flexible build on Windows.
 Enough time to get something working?  Dunno :(

Just FYI, RELWITHDEBINFO was a broken model, but that's the model we
have always aimed for with separate .pdb symbol files for win builds.
We want several things that the attached patch to cmake 2.8.7 addresses
(it isn't the most elegant, but it works);

* disable stack corruption^Woptimization so that user crash dumps
  with no debug info are still nominally decipherable

* a release build is *never* incremental (duh)

* /opt:ref to toss useless/unreferenced debug leftovers for release

* there was a stupid bug where shared lib link flags in RELWITHDEBINFO
  inherited DEBUG model, not RELWITHDEBINFO model from exe link flags.

I've never worked out how to propagate the actual .pdb file into the
install lib/ or bin/ dir when performing the .exe / .dll install step.
Hints on improving the patch would be great.

  
--- cmake-2.8/Modules/Platform/Windows-cl.cmake.bak	Fri Dec 30 11:45:41 2011
+++ cmake-2.8/Modules/Platform/Windows-cl.cmake	Mon Apr 16 14:35:15 2012
@@ -155,14 +155,14 @@
   SET(CMAKE_BUILD_TYPE_INIT Debug)
   SET (CMAKE_CXX_FLAGS_INIT /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR)
   SET (CMAKE_CXX_FLAGS_DEBUG_INIT /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1)
-  SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /D NDEBUG)
-  SET (CMAKE_CXX_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /D NDEBUG)
-  SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /D NDEBUG)
+  SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /Oy- /D NDEBUG)
+  SET (CMAKE_CXX_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /Oy- /D NDEBUG)
+  SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /Oy- /D NDEBUG)
   SET (CMAKE_C_FLAGS_INIT /DWIN32 /D_WINDOWS /W3 /Zm1000)
   SET (CMAKE_C_FLAGS_DEBUG_INIT /D_DEBUG /MDd /Zi  /Ob0 /Od /RTC1)
-  SET (CMAKE_C_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /D NDEBUG)
-  SET (CMAKE_C_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /D NDEBUG)
-  SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /D NDEBUG)
+  SET (CMAKE_C_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /Oy- /D NDEBUG)
+  SET (CMAKE_C_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /Oy- /D NDEBUG)
+  SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /Oy- /D NDEBUG)
   SET (CMAKE_C_STANDARD_LIBRARIES_INIT kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib )
   SET (CMAKE_EXE_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
 ELSE(MSVC_VERSION GREATER 1310)
@@ -173,7 +173,7 @@
 SET (CMAKE_CXX_FLAGS_DEBUG_INIT /D_DEBUG /MTd /Zi  /Ob0 /Od /GZ)
 SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT /MT /O1 /Ob1 /D NDEBUG)
 SET (CMAKE_CXX_FLAGS_RELEASE_INIT /MT /O2 /Ob2 /D NDEBUG)
-SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT /MT /Zi /O2 /Ob1 /D NDEBUG)
+SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT /MT /Zi /O2 /Ob1 /Oy- /D NDEBUG)
 SET (CMAKE_C_FLAGS_INIT /DWIN32 /D_WINDOWS /W3 /Zm1000)
 SET (CMAKE_C_FLAGS_DEBUG_INIT /D_DEBUG /MTd /Zi  /Ob0 /Od /GZ)
 SET (CMAKE_C_FLAGS_MINSIZEREL_INIT /MT /O1 /Ob1 /D NDEBUG)
@@ -183,14 +183,14 @@
 SET(CMAKE_BUILD_TYPE_INIT Debug)
 SET (CMAKE_CXX_FLAGS_INIT /DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR)
 SET (CMAKE_CXX_FLAGS_DEBUG_INIT /D_DEBUG /MDd /Zi  /Ob0 /Od /GZ)
-SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /D NDEBUG)
-SET (CMAKE_CXX_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /D NDEBUG)
-SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /D NDEBUG)
+SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /Oy- /D NDEBUG)
+SET (CMAKE_CXX_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /Oy- /D NDEBUG)
+SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /Oy- /D NDEBUG)
 SET (CMAKE_C_FLAGS_INIT /DWIN32 /D_WINDOWS /W3 /Zm1000)
 SET (CMAKE_C_FLAGS_DEBUG_INIT /D_DEBUG /MDd /Zi /Ob0 /Od /GZ)
-SET (CMAKE_C_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /D NDEBUG)
-SET (CMAKE_C_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /D NDEBUG)
-SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /D NDEBUG)
+SET (CMAKE_C_FLAGS_MINSIZEREL_INIT /MD /O1 /Ob1 /Oy- /D NDEBUG)
+SET (CMAKE_C_FLAGS_RELEASE_INIT /MD /O2 /Ob2 /Oy- /D NDEBUG)
+SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT /MD /Zi /O2 /Ob1 /Oy- /D NDEBUG)
   ENDIF(CMAKE_USING_VC_FREE_TOOLS)
   SET (CMAKE_C_STANDARD_LIBRARIES_INIT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib)
 ENDIF(MSVC_VERSION GREATER 1310)
@@ -218,10 +218,10 @@
 
 IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
   SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT /debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG})
-  SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT /debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG})
+  SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT /debug /pdbtype:sept /INCREMENTAL:NO /OPT:REF)
 ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
  

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

2013-08-20 Thread William A. Rowe Jr.
On Tue, 20 Aug 2013 15:47:46 -0400
Jeff Trawick traw...@gmail.com wrote:

 I plan to spend some time tilting at that windmill starting later this
 week, for the purposes of getting a flexible build on Windows.
 Enough time to get something working?  Dunno :(

Feel free to attack it from either angle, once we have a unix or 
a windows starting point, the rest is straightforward.

I've looked some at what it will take.  Was going to use what the
pcre project has done as a starting point.