[CMake] Eclipse CDT Bug?

2011-11-21 Thread Mauricio de Paulo

Hi list,
I've just recently became a CMake user and I'm really glad such a 
powerfull tool is available.


I've used CMake with KDevelop so far but I'd really like to change to 
Eclipse.


I've found that the Eclipse generator is not working properly and I 
wrote myself a simple fix after some hours googling for solutions:


cmake -GEclipse CDT4 - Unix Makefiles -DCMAKE_BUILD_TYPE=Debug .
awk -vRS=/link  '{gsub(/link.*/,) }1' .project  .project-new
mv -f .project-new .project

Someone wrote about a bug with CMake 2.8.5 that was generating a few 
wrong tags when exporting to Eclipse. The code above is just a shell 
script with awk to remove the wrong tags.


Is this already fixed on CMake 2.8.6? I'm using kubuntu 11.10 and the 
CMake version in the repository is 2.8.5.


Thanks for an incredible software.

--
Mauricio C. M. de Paulo
Engenheiro Cartógrafo
Mestrando em Sensoriamento Remoto (INPE)

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Eclipse CDT Bug?

2011-11-21 Thread Mauricio de Paulo

Hi Alexander, thanks for the quick reply!

As far as I've read, the problem is with the linkedResources tag. The 
workaround I wrote just removes the link inside it.


I've downloaded cmake 2.8.6, removed 2.8.5 packaged, and tested it with 
the same results. I'm afraid the problem persists. Is this tag doing 
what it's suposed to do? My project is pretty simple, just a few cpps 
and one link target.


I haven't tested out source builds with the tag removed, but I think the 
workaround might solve this too.


I'm attaching the .project generated with the command bellow:

cmake -GEclipse CDT4 - Unix Makefiles -DCMAKE_BUILD_TYPE=Debug .

Am i doing something wrong?


Mauricio C. M. de Paulo
Engenheiro Cartógrafo
Mestrando em Sensoriamento Remoto (INPE)


On 11/21/2011 02:39 PM, Alexander Neundorf wrote:

On Monday 21 November 2011, Mauricio de Paulo wrote:

Hi list,
I've just recently became a CMake user and I'm really glad such a
powerfull tool is available.

I've used CMake with KDevelop so far but I'd really like to change to
Eclipse.

I've found that the Eclipse generator is not working properly and I
wrote myself a simple fix after some hours googling for solutions:

cmake -GEclipse CDT4 - Unix Makefiles -DCMAKE_BUILD_TYPE=Debug .
awk -vRS=/link  '{gsub(/link.*/,) }1' .project  .project-new
mv -f .project-new .project

Someone wrote about a bug with CMake 2.8.5 that was generating a few
wrong tags when exporting to Eclipse. The code above is just a shell
script with awk to remove the wrong tags.

Is this already fixed on CMake 2.8.6?

Please give it a try, I think so.
You can simply download the binary package for Linux from www.cmake.org and
unpack it anywhere on your system (e.g. /opt), it will work.


I'm using kubuntu 11.10 and the
CMake version in the repository is 2.8.5.

Or please send me the corupted .project file.

Alex
?xml version=1.0 encoding=UTF-8?
projectDescription
	nameselecao-Debug@src/name
	comment/comment
	projects
	/projects
	buildSpec
		buildCommand
			nameorg.eclipse.cdt.make.core.makeBuilder/name
			triggersclean,full,incremental,/triggers
			arguments
dictionary
	keyorg.eclipse.cdt.make.core.cleanBuildTarget/key
	valueclean/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.enableCleanBuild/key
	valuetrue/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.append_environment/key
	valuetrue/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.stopOnError/key
	valuetrue/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.enabledIncrementalBuild/key
	valuetrue/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.build.command/key
	value/usr/bin/make/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.contents/key
	valueorg.eclipse.cdt.make.core.activeConfigSettings/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.build.target.inc/key
	valueall/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.build.arguments/key
	value/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.buildLocation/key
	value/home/mauricio/Desktop/INPE/processamento_imagens/selecao_atributos/src/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.useDefaultBuildCmd/key
	valuefalse/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.environment/key
	valueVERBOSE=1|CMAKE_NO_VERBOSE=1|/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.enableFullBuild/key
	valuetrue/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.build.target.auto/key
	valueall/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.enableAutoBuild/key
	valuefalse/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.build.target.clean/key
	valueclean/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.fullBuildTarget/key
	valueall/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.buildArguments/key
	value/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.build.location/key
	value/home/mauricio/Desktop/INPE/processamento_imagens/selecao_atributos/src/value
/dictionary
dictionary
	keyorg.eclipse.cdt.make.core.autoBuildTarget/key
	valueall/value
/dictionary
dictionary
	keyorg.eclipse.cdt.core.errorOutputParser/key
	valueorg.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;/value
/dictionary
			/arguments
		/buildCommand
		buildCommand
			nameorg.eclipse.cdt.make.core.ScannerConfigBuilder/name
			arguments
			/arguments
		/buildCommand
	/buildSpec
	natures
		natureorg.eclipse.cdt.core.ccnature/nature
		natureorg.eclipse.cdt.make.core.makeNature/nature