Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-23 Thread Benjamin Eikel
Am Donnerstag, 6. September 2012 um 09:24:39 schrieb Benjamin Eikel:
 Am Mittwoch, 5. September 2012 um 22:29:59 schrieb Bill Hoffman:
  On 9/5/2012 3:11 PM, Benjamin Eikel wrote:
   That might become a problem. I tried
   
   codeblocks --build --target=MyTarget MyProject.cbp
   
   which works and builds the specified target inside the project. But
   that opens a log window. I have not found a possibility to execute
   that without a display, yet.
  
  http://www.codeblocks.org/docs/manual_en.pdf
  
  IDE CodeBlocks can be executed from the command line without a graphic
  interface.
  In such a case, there are several switches available for controlling the
  build process of a
  project. Since CodeBlocks is thus scriptable, the creation of
  executables can be integrated
  into your own work processes.
  codeblocks.exe /na /nd --no-splash-screen --built name.cbp
  --target=’Release’
 
 I also read this, but it is not true. Even with all these command line
 switches a window appears showing the build log. If I set the DISPLAY
 environment variable to an invalid value, I get the error message Error:
 Unable to initialize gtk, is DISPLAY set properly?. There is also an old
 forum discussion about this:
 http://forums.codeblocks.org/index.php/topic,9731.0.html

I asked for help in the Code::Blocks forums:
http://forums.codeblocks.org/index.php/topic,16892.new.html

 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-10 Thread Benjamin Eikel
Am Sonntag, 9. September 2012 um 20:02:37 schrieb Peter Kümmel:
 On 09.09.2012 19:50, Benjamin Eikel wrote:
  Dear CMake developers,
  
  I looked at the output of my CMake build/bin/cmake
  --system-information with the Unix Makefiles generator and the new
  Code::Blocks generator. For the new Code::Blocks generator, the
  variables CMAKE_LIBRARY_ARCHITECTURE (and the analogous ones for the
  languages), CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES, and
  CMAKE_${LANG}_IMPLICIT_LINK_LIBRARIES are empty. They are not empty for
  the Unix Makefiles generator. I have searched the place where they are
  set and tried to trace it back to the generator code. But I still have
  not found it. Can you tell me what I have to do to make these variables
  get the same content when using the new Code::Blocks generator?
 
 When you are looking for some cmake variables you should also search in the
 Modules/ folder not only C++ files in Source/, because cmake by itself uses
 cmake files.

Yes, thanks, but I knew that. I have found these variables there. But as 
stated before, I cannot find the place where the other generator somehow 
triggers that these variables are set and my generator does not.

 
  Kind regards
  Benjamin
  --
  
  Powered by www.kitware.com
  
  Visit other Kitware open-source projects at
  http://www.kitware.com/opensource/opensource.html
  
  Please keep messages on-topic and check the CMake FAQ at:
  http://www.cmake.org/Wiki/CMake_FAQ
  
  Follow this link to subscribe/unsubscribe:
  http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
 
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-09 Thread Benjamin Eikel
Dear CMake developers,

I looked at the output of my CMake build/bin/cmake --system-information 
with the Unix Makefiles generator and the new Code::Blocks generator. For the 
new Code::Blocks generator, the variables CMAKE_LIBRARY_ARCHITECTURE (and the 
analogous ones for the languages), CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES, 
and CMAKE_${LANG}_IMPLICIT_LINK_LIBRARIES are empty. They are not empty for 
the Unix Makefiles generator. I have searched the place where they are set and 
tried to trace it back to the generator code. But I still have not found it. 
Can you tell me what I have to do to make these variables get the same content 
when using the new Code::Blocks generator?

Kind regards
Benjamin
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-09 Thread Peter Kümmel

On 09.09.2012 19:50, Benjamin Eikel wrote:

Dear CMake developers,

I looked at the output of my CMake build/bin/cmake --system-information
with the Unix Makefiles generator and the new Code::Blocks generator. For the
new Code::Blocks generator, the variables CMAKE_LIBRARY_ARCHITECTURE (and the
analogous ones for the languages), CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES,
and CMAKE_${LANG}_IMPLICIT_LINK_LIBRARIES are empty. They are not empty for
the Unix Makefiles generator. I have searched the place where they are set and
tried to trace it back to the generator code. But I still have not found it.
Can you tell me what I have to do to make these variables get the same content
when using the new Code::Blocks generator?


When you are looking for some cmake variables you should also search in the
Modules/ folder not only C++ files in Source/, because cmake by itself uses 
cmake files.



Kind regards
Benjamin
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-08 Thread Benjamin Eikel
Am Freitag, 7. September 2012 um 18:59:49 schrieb Bill Hoffman:
 On 9/7/2012 12:13 PM, Benjamin Eikel wrote:
  Yes, I have seen that in the beginning when the generator did not work as
  expected. At the moment, it builds from the command line, but only if you
  give it access to a display (a window is opened by C::B, but that closes
  immediately after the build has finished). So try-compiles work, but the
  situation with the window is unacceptable. I have to see if somebody
  from the C::B community is willing to help.
 
 OK, well, if that is working.  Then build cmake, and then do
 ./bin/ctest, it should run all the tests and show what you need to do.

Doing that everything seems to be fine (complex, complexOneConfig and 
CMake.CheckSourceTree fail with master branch for me, too). But I have the 
feeling that the new generator is used only in very few tests. I tried setting 
CMAKE_TEST_GENERATOR to the name of the new generator and that makes more 
tests fail.

 
 -Bill
 
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-08 Thread Peter Kümmel

On 08.09.2012 11:51, Benjamin Eikel wrote:

Am Freitag, 7. September 2012 um 18:59:49 schrieb Bill Hoffman:

On 9/7/2012 12:13 PM, Benjamin Eikel wrote:

Yes, I have seen that in the beginning when the generator did not work as
expected. At the moment, it builds from the command line, but only if you
give it access to a display (a window is opened by C::B, but that closes
immediately after the build has finished). So try-compiles work, but the
situation with the window is unacceptable. I have to see if somebody
from the C::B community is willing to help.


OK, well, if that is working.  Then build cmake, and then do
./bin/ctest, it should run all the tests and show what you need to do.


Doing that everything seems to be fine (complex, complexOneConfig and
CMake.CheckSourceTree fail with master branch for me, too). But I have the
feeling that the new generator is used only in very few tests. I tried setting
CMAKE_TEST_GENERATOR to the name of the new generator and that makes more
tests fail.


When you build cmake with your new generator it would be selected automatically.
But it's a chicken-egg problem then.





-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-08 Thread Benjamin Eikel
Am Samstag, 8. September 2012 um 16:53:56 schrieb David Cole:
 On Sat, Sep 8, 2012 at 6:38 AM, Peter Kümmel syntheti...@gmx.net wrote:
  On 08.09.2012 11:51, Benjamin Eikel wrote:
  Am Freitag, 7. September 2012 um 18:59:49 schrieb Bill Hoffman:
  On 9/7/2012 12:13 PM, Benjamin Eikel wrote:
  Yes, I have seen that in the beginning when the generator did not work
  as
  expected. At the moment, it builds from the command line, but only if
  you
  give it access to a display (a window is opened by C::B, but that
  closes immediately after the build has finished). So try-compiles
  work, but the situation with the window is unacceptable. I have to
  see if somebody from the C::B community is willing to help.
  
  OK, well, if that is working.  Then build cmake, and then do
  ./bin/ctest, it should run all the tests and show what you need to do.
  
  Doing that everything seems to be fine (complex, complexOneConfig and
  CMake.CheckSourceTree fail with master branch for me, too). But I have
  the feeling that the new generator is used only in very few tests. I
  tried setting
  CMAKE_TEST_GENERATOR to the name of the new generator and that makes
  more tests fail.
  
  When you build cmake with your new generator it would be selected
  automatically.
  But it's a chicken-egg problem then.
[... snip ...]
 
 How many/what percentage tests fail when you set CMAKE_TEST_GENERATOR
 to your new generator?

A lot of tests fail if I do this ( 50%). Without setting this variable, are 
all generators tested that are enabled for the current platform?
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-08 Thread David Cole
On Sat, Sep 8, 2012 at 11:02 AM, Benjamin Eikel cm...@eikel.org wrote:
 Am Samstag, 8. September 2012 um 16:53:56 schrieb David Cole:
 On Sat, Sep 8, 2012 at 6:38 AM, Peter Kümmel syntheti...@gmx.net wrote:
  On 08.09.2012 11:51, Benjamin Eikel wrote:
  Am Freitag, 7. September 2012 um 18:59:49 schrieb Bill Hoffman:
  On 9/7/2012 12:13 PM, Benjamin Eikel wrote:
  Yes, I have seen that in the beginning when the generator did not work
  as
  expected. At the moment, it builds from the command line, but only if
  you
  give it access to a display (a window is opened by C::B, but that
  closes immediately after the build has finished). So try-compiles
  work, but the situation with the window is unacceptable. I have to
  see if somebody from the C::B community is willing to help.
 
  OK, well, if that is working.  Then build cmake, and then do
  ./bin/ctest, it should run all the tests and show what you need to do.
 
  Doing that everything seems to be fine (complex, complexOneConfig and
  CMake.CheckSourceTree fail with master branch for me, too). But I have
  the feeling that the new generator is used only in very few tests. I
  tried setting
  CMAKE_TEST_GENERATOR to the name of the new generator and that makes
  more tests fail.
 
  When you build cmake with your new generator it would be selected
  automatically.
  But it's a chicken-egg problem then.
 [... snip ...]

 How many/what percentage tests fail when you set CMAKE_TEST_GENERATOR
 to your new generator?

 A lot of tests fail if I do this ( 50%). Without setting this variable, are
 all generators tested that are enabled for the current platform?
 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Only very minimally (there's a CMakeTestAllGenerators test that smoke
tests each generator, but does not verify that the generated projects
actually build...).

Principally, the generator that was used to build CMake is the one
that is tested with the vast majority of the tests when the test suite
is run.


HTH,
David
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-07 Thread Benjamin Eikel
Hello again,

the generator works rudimentary. I am able to generate Code::Blocks projects 
for simple CMake projects. I still have to fix a bug with link interface 
libraries and have to see what I can do about the window that is shown by 
Code::Blocks when doing command line builds (I am still waiting for a 
Code::Blocks forum account to be accepted).
Is there a set of CMake projects that can be used to put the new generator to 
the acid test?

Kind regards
Benjamin
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-07 Thread Bill Hoffman

On 9/7/2012 11:02 AM, Benjamin Eikel wrote:

Hello again,

the generator works rudimentary. I am able to generate Code::Blocks projects
for simple CMake projects. I still have to fix a bug with link interface
libraries and have to see what I can do about the window that is shown by
Code::Blocks when doing command line builds (I am still waiting for a
Code::Blocks forum account to be accepted).
Is there a set of CMake projects that can be used to put the new generator to
the acid test?
You have to have some command line building working or else try-compiles 
won't run, and it can not verify the compile.


-Bill


--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-07 Thread David Cole
Just run ctest in your build tree once you have everything working.

That will execute the CMake test suite with your new generator.


On Fri, Sep 7, 2012 at 11:02 AM, Benjamin Eikel cm...@eikel.org wrote:
 Hello again,

 the generator works rudimentary. I am able to generate Code::Blocks projects
 for simple CMake projects. I still have to fix a bug with link interface
 libraries and have to see what I can do about the window that is shown by
 Code::Blocks when doing command line builds (I am still waiting for a
 Code::Blocks forum account to be accepted).
 Is there a set of CMake projects that can be used to put the new generator to
 the acid test?

 Kind regards
 Benjamin
 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-07 Thread Benjamin Eikel
Am Freitag, 7. September 2012 um 17:07:28 schrieb Bill Hoffman:
 On 9/7/2012 11:02 AM, Benjamin Eikel wrote:
  Hello again,
  
  the generator works rudimentary. I am able to generate Code::Blocks
  projects for simple CMake projects. I still have to fix a bug with link
  interface libraries and have to see what I can do about the window that
  is shown by Code::Blocks when doing command line builds (I am still
  waiting for a Code::Blocks forum account to be accepted).
  Is there a set of CMake projects that can be used to put the new
  generator to the acid test?
 
 You have to have some command line building working or else try-compiles
 won't run, and it can not verify the compile.

Yes, I have seen that in the beginning when the generator did not work as 
expected. At the moment, it builds from the command line, but only if you give 
it access to a display (a window is opened by C::B, but that closes 
immediately after the build has finished). So try-compiles work, but the 
situation with the window is unacceptable. I have to see if somebody from the 
C::B community is willing to help.

 
 -Bill
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-07 Thread Bill Hoffman

On 9/7/2012 12:13 PM, Benjamin Eikel wrote:

Yes, I have seen that in the beginning when the generator did not work as
expected. At the moment, it builds from the command line, but only if you give
it access to a display (a window is opened by C::B, but that closes
immediately after the build has finished). So try-compiles work, but the
situation with the window is unacceptable. I have to see if somebody from the
C::B community is willing to help.
OK, well, if that is working.  Then build cmake, and then do 
./bin/ctest, it should run all the tests and show what you need to do.


-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-06 Thread Benjamin Eikel
Am Mittwoch, 5. September 2012 um 22:29:59 schrieb Bill Hoffman:
 On 9/5/2012 3:11 PM, Benjamin Eikel wrote:
  That might become a problem. I tried
  
  codeblocks --build --target=MyTarget MyProject.cbp
  
  which works and builds the specified target inside the project. But that
  opens a log window. I have not found a possibility to execute that
  without a display, yet.
 
 http://www.codeblocks.org/docs/manual_en.pdf
 
 IDE CodeBlocks can be executed from the command line without a graphic
 interface.
 In such a case, there are several switches available for controlling the
 build process of a
 project. Since CodeBlocks is thus scriptable, the creation of
 executables can be integrated
 into your own work processes.
 codeblocks.exe /na /nd --no-splash-screen --built name.cbp
 --target=’Release’

I also read this, but it is not true. Even with all these command line 
switches a window appears showing the build log. If I set the DISPLAY 
environment variable to an invalid value, I get the error message Error: 
Unable to initialize gtk, is DISPLAY set properly?. There is also an old 
forum discussion about this:
http://forums.codeblocks.org/index.php/topic,9731.0.html
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-06 Thread Peter Kümmel

On 05.09.2012 20:54, Alexander Neundorf wrote:

Something like
$ codeblocks --build foo.cbp


Ah, a new build system ;)


This is more or less necessary so cmake can run its test suite to verify the
generator works correctly.

Alex
--


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] Using the internal Code::Blocks builder

2012-09-05 Thread Benjamin Eikel
Dear CMake developers,

I wanted to know if it is possible to let CMake generate a project that uses 
the internal build system of the Code::Blocks IDE.
My motivation for this was that a friend of mine, who works together with me 
on different projects that use CMake, uses Code::Blocks for years. He tried 
CMake's Code::Blocks generator with Makefiles several times and has never been 
satisfied (parallel builds not working, stopping of build not working, slow 
make on Windows etc.). He ended up creating a Code::Blocks project manually.
I have written a number of hacks that modify the existing Code::Blocks 
generator to generate a project that does not use the generated Makefile, but 
the build system of Code::Blocks instead. I do not intend to push these 
patches, they were only ment as a proof-of-concept implementation. With these 
patches applied I am able to build several of our projects (shared libraries, 
dependencies on external libraries, applications using them) with the 
generated Code::Blocks project.
My questions to you are:
1. Is the CMake community interested in a project generator for CMake that 
generates native Code::Blocks projects? If you say that this is something that 
you do not want to have, I will stop my work and give my friend a custom CMake 
build containing my hacks. If you are nothing loath to have such generator, I 
want to try to find a way to do it right and prepare a topic branch.
2. What would be the right way to write such a generator? I think modifying 
the cmExtraCodeBlocksGenerator class is not the right way. Maybe one would 
have to write a new subclass of cmGlobalGenerator?

Kind regards
Benjamin
From 38a1e84b3719192f4f28f4c72da5ae39430812ca Mon Sep 17 00:00:00 2001
From: Benjamin Eikel cm...@eikel.org
Date: Sun, 2 Sep 2012 16:31:55 +0200
Subject: [PATCH 1/9] Dirty hack to use Code::Blocks internal builder without
 a need for a Makefile

---
 Source/cmExtraCodeBlocksGenerator.cxx |   35 -
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index ad4ab76..419e9b7 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -315,7 +315,7 @@ void cmExtraCodeBlocksGenerator
FileVersion major=\1\ minor=\6\ /\n
Project\n
   Option title=\  mf-GetProjectName()\ /\n
-  Option makefile_is_custom=\1\ /\n
+  Option makefile_is_custom=\0\ /\n
   Option compiler=\  compiler  \ /\n
   virtualFolders\n
   Build\n;
@@ -632,6 +632,39 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream fout,
 fout Add option=\-D  safedef.str()  \ /\n;
 }
   }
+const char* cflags = target-GetProperty(COMPILE_FLAGS);
+if(cflags)
+  {
+  // Expand the list.
+  std::vectorstd::string flags;
+  cmSystemTools::ExpandListArgument(cflags, flags);
+  for(std::vectorstd::string::const_iterator fi = flags.begin();
+  fi != flags.end(); ++fi)
+{
+cmXMLSafe safeflag(fi-c_str());
+fout Add option=\  safeflag.str()  \ /\n;
+}
+  }
+
+std::string sharedLibFlagsVar = CMAKE_SHARED_LIBRARY_CXX_FLAGS;
+if (this-GlobalGenerator-GetLanguageEnabled(CXX) == false)
+  {
+sharedLibFlagsVar = CMAKE_SHARED_LIBRARY_C_FLAGS;
+  }
+const char* sldefs = target-GetMakefile()-GetSafeDefinition(
+ CMAKE_SHARED_LIBRARY_CXX_FLAGS);
+if(sldefs)
+  {
+  // Expand the list.
+  std::vectorstd::string defs;
+  cmSystemTools::ExpandListArgument(sldefs, defs);
+  for(std::vectorstd::string::const_iterator di = defs.begin();
+  di != defs.end(); ++di)
+{
+cmXMLSafe safedef(di-c_str());
+fout Add option=\  safedef.str()  \ /\n;
+}
+  }
 
   // the include directories for this target
   std::setstd::string uniqIncludeDirs;
-- 
1.7.10.4

From 54def9141a6477d65e49ed81fb20b7ce930dc467 Mon Sep 17 00:00:00 2001
From: Benjamin Eikel cm...@eikel.org
Date: Tue, 4 Sep 2012 18:23:06 +0200
Subject: [PATCH 2/9] Build a virtual target All referencing all other
 targets built

---
 Source/cmExtraCodeBlocksGenerator.cxx |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 419e9b7..d4ecae5 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -322,6 +322,7 @@ void cmExtraCodeBlocksGenerator
 
   this-AppendTarget(fout, all, 0, make.c_str(), mf, compiler.c_str());
 
+  std::vectorstd::string virtualTargetDeps;
   // add all executable and library targets and some of the GLOBAL
   // and UTILITY targets
   for (std::vectorcmLocalGenerator*::const_iterator lg=lgs.begin();
@@ -388,6 

Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-05 Thread Alexander Neundorf
On Wednesday 05 September 2012, Benjamin Eikel wrote:
 Dear CMake developers,
 
 I wanted to know if it is possible to let CMake generate a project that
 uses the internal build system of the Code::Blocks IDE.
 My motivation for this was that a friend of mine, who works together with
 me on different projects that use CMake, uses Code::Blocks for years. He
 tried CMake's Code::Blocks generator with Makefiles several times and has
 never been satisfied (parallel builds not working, stopping of build not
 working, slow make on Windows etc.). He ended up creating a Code::Blocks
 project manually. I have written a number of hacks that modify the
 existing Code::Blocks generator to generate a project that does not use
 the generated Makefile, but the build system of Code::Blocks instead. I do
 not intend to push these patches, they were only ment as a
 proof-of-concept implementation. With these patches applied I am able to
 build several of our projects (shared libraries, dependencies on external
 libraries, applications using them) with the generated Code::Blocks
 project.
 My questions to you are:
 1. Is the CMake community interested in a project generator for CMake that
 generates native Code::Blocks projects? If you say that this is something
 that you do not want to have, I will stop my work and give my friend a
 custom CMake build containing my hacks. If you are nothing loath to have
 such generator, I want to try to find a way to do it right and prepare a
 topic branch. 

I wrote the existing CodeBlocks generator, and I'd be happy if you write a 
real one.
So, go ahead :-)
Is it possible to build a CodeBlocks project from the command line ? 
I think this is necessary so all the tests can be executed.

 2. What would be the right way to write such a generator? I
 think modifying the cmExtraCodeBlocksGenerator class is not the right way.
 Maybe one would have to write a new subclass of cmGlobalGenerator?

Yes.

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-05 Thread Benjamin Eikel
Hello Alex,

Am Mittwoch, 5. September 2012 um 19:34:56 schrieb Alexander Neundorf:
 On Wednesday 05 September 2012, Benjamin Eikel wrote:
  Dear CMake developers,
  
  I wanted to know if it is possible to let CMake generate a project that
  uses the internal build system of the Code::Blocks IDE.
  My motivation for this was that a friend of mine, who works together with
  me on different projects that use CMake, uses Code::Blocks for years. He
  tried CMake's Code::Blocks generator with Makefiles several times and has
  never been satisfied (parallel builds not working, stopping of build not
  working, slow make on Windows etc.). He ended up creating a Code::Blocks
  project manually. I have written a number of hacks that modify the
  existing Code::Blocks generator to generate a project that does not use
  the generated Makefile, but the build system of Code::Blocks instead. I
  do not intend to push these patches, they were only ment as a
  proof-of-concept implementation. With these patches applied I am able to
  build several of our projects (shared libraries, dependencies on external
  libraries, applications using them) with the generated Code::Blocks
  project.
  My questions to you are:
  1. Is the CMake community interested in a project generator for CMake
  that generates native Code::Blocks projects? If you say that this is
  something that you do not want to have, I will stop my work and give my
  friend a custom CMake build containing my hacks. If you are nothing
  loath to have such generator, I want to try to find a way to do it right
  and prepare a topic branch.
 
 I wrote the existing CodeBlocks generator, and I'd be happy if you write a
 real one.
 So, go ahead :-)
 Is it possible to build a CodeBlocks project from the command line ?
 I think this is necessary so all the tests can be executed.

if the new CMake generator builds an XML project file like it is done at the 
moment, sure. Why shouldn't that be possible? At the moment you can build one 
with e.g. cmake -G CodeBlocks - Unix Makefiles (I am sure you know that. But 
especially because of that, I do not fully understand your question).

 
  2. What would be the right way to write such a generator? I
  think modifying the cmExtraCodeBlocksGenerator class is not the right
  way. Maybe one would have to write a new subclass of cmGlobalGenerator?
 
 Yes.

Alright. Thank you for your fast answer.

Kind regards
Benjamin

 
 Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-05 Thread Bill Hoffman

On 9/5/2012 2:48 PM, Benjamin Eikel wrote:

So, go ahead:-)
Is it possible to build a CodeBlocks project from the command line ?
I think this is necessary so all the tests can be executed.

if the new CMake generator builds an XML project file like it is done at the
moment, sure. Why shouldn't that be possible? At the moment you can build one
with e.g. cmake -G CodeBlocks - Unix Makefiles (I am sure you know that. But
especially because of that, I do not fully understand your question).

CMake needs to be able to build with the generator being used so that it 
can be tested.  Just because CodeBlocks - Unix Makefiles is able to 
build a file, does not mean the new CodeBlocks Native generator is 
able to build the same file.  So, for testability cmake will need to 
drive the CodeBlocks build.  It would be great to have a native 
CodeBlocks IDE XML file.  It maybe difficult if CodeBlocks does not 
support building all the things cmake can build.


-Bill


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Using the internal Code::Blocks builder

2012-09-05 Thread Benjamin Eikel
Am Mittwoch, 5. September 2012 um 20:54:57 schrieb Alexander Neundorf:
 On Wednesday 05 September 2012, Benjamin Eikel wrote:
  Hello Alex,
  
  Am Mittwoch, 5. September 2012 um 19:34:56 schrieb Alexander Neundorf:
   On Wednesday 05 September 2012, Benjamin Eikel wrote:
Dear CMake developers,

I wanted to know if it is possible to let CMake generate a project
that uses the internal build system of the Code::Blocks IDE.
My motivation for this was that a friend of mine, who works together
with me on different projects that use CMake, uses Code::Blocks for
years. He tried CMake's Code::Blocks generator with Makefiles several
times and has never been satisfied (parallel builds not working,
stopping of build not working, slow make on Windows etc.). He ended
up creating a Code::Blocks project manually. I have written a number
of hacks that modify the existing Code::Blocks generator to generate
a project that does not use the generated Makefile, but the build
system of Code::Blocks instead. I do not intend to push these
patches, they were only ment as a
proof-of-concept implementation. With these patches applied I am able
to build several of our projects (shared libraries, dependencies on
external libraries, applications using them) with the generated
Code::Blocks project.
My questions to you are:
1. Is the CMake community interested in a project generator for CMake
that generates native Code::Blocks projects? If you say that this is
something that you do not want to have, I will stop my work and give
my friend a custom CMake build containing my hacks. If you are
nothing loath to have such generator, I want to try to find a way to
do it right and prepare a topic branch.
   
   I wrote the existing CodeBlocks generator, and I'd be happy if you
   write a real one.
   So, go ahead :-)
   Is it possible to build a CodeBlocks project from the command line ?
   I think this is necessary so all the tests can be executed.
  
  if the new CMake generator builds an XML project file like it is done at
  the moment, sure. Why shouldn't that be possible? At the moment you can
  build one with e.g. cmake -G CodeBlocks - Unix Makefiles (I am sure you
  know that. But especially because of that, I do not fully understand your
  question).
 
 Yes, this is not what I meant.
 Once cmake has generated a codeblocks project, let's say foo.cbp, is it
 possible to build (compile) this project using codeblocks from the command
 line ?
 Something like
 $ codeblocks --build foo.cbp
 
 This is more or less necessary so cmake can run its test suite to verify
 the generator works correctly.

That might become a problem. I tried

codeblocks --build --target=MyTarget MyProject.cbp

which works and builds the specified target inside the project. But that opens 
a log window. I have not found a possibility to execute that without a 
display, yet.

 
 Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers