Re: [CMake] Fixed ProjectGUID

2011-01-19 Thread Sören Freudiger
Okay.
As it seems it's very simpel to change see GUID without any patch:

set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )



 Original-Nachricht 
 Datum: Fri, 7 Jan 2011 22:26:31 +0100
 Von: Pau Garcia i Quiles pgqui...@elpauer.org
 An: David Cole david.c...@kitware.com
 CC: Sören Freudiger muffmo...@gmx.de, cmake@cmake.org
 Betreff: Re: [CMake] Fixed ProjectGUID

 Hello,
 
 In Visual Studio 2010, ProjectGUID is a global. This bug provides a
 patch to add global definitions to CMake, but only up to Visual Studio
 2008. It shouldn't be difficult to update the patch to add support for
 Visual C++ 2010. Setting the ProjectGUID would then be as easy as:
 
 set_target_properties( thetarget PROPERTIES VS_GLOBAL_ProjectGUID
 {384A545C-A6F2-4833-9260-F05C46557610} )
 
 I opened the bug and provided the code almost two years ago, so it's
 not like I expect CMake developers to suddenly implement it...
 
 2011/1/7 David Cole david.c...@kitware.com:
  The guids should remain constant in a given build tree for the life of
 the
  CMakeCache.txt file.
 
  But after you delete that and start in a fresh build tree, you'll get
 fresh
  guids.
 
  If you want constant guids in your vcproj files, they should be built by
  hand, not with CMake.
 
 
  HTH,
  David
 
 
  2011/1/7 Sören Freudiger muffmo...@gmx.de
 
  Hello
  Is it possible to set the ProjectGUID by CMake? Every time I generate a
  vcproj file with CMake the ProjectGUID changes. But we need to have a
 fixed
  one (because other projects are including the vcproj).
 
  Best regards
  SirAnn
  --
  GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
  gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
  ___
  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
 
 
  ___
  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
 
 
 
 
 -- 
 Pau Garcia i Quiles
 http://www.elpauer.org
 (Due to my workload, I may need 10 days to answer)

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone
___
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

[CMake] VS resource compiler preprocessor defines

2011-01-18 Thread Sören Freudiger
Hello
Right now the CXX preprocessor defines are also used as the preprocessor 
defines for the resource compiler (rc). Is there a way of changing that 
behavior? We are using different preprocessor defines for cl and rc. And 
sometimes we even connot use the cxx flags for the rc compiler...

Any idea?

Best
SirAnn
-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
___
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] VS resource compiler preprocessor defines

2011-01-18 Thread Sören Freudiger
hmm.. okay. That means I have to set the target properties for the cxx files 
like this:


add_executable( ${MY_PROJECT} WIN32 ${SOURCE_FILES} )
set_target_properties( ${MY_PROJECT} PROPERTIES COMPILE_DEFINITIONS 
${MY_CXX_PRE_DEFS}) 

with MY_CXX_PRE_DEFS: DEF1;DEF2;DEF3

or

set_target_properties( ${MY_PROJECT} PROPERTIES COMPILE_FLAGS 
${MY_CXX_PRE_DEFS}) 

with MY_CXX_PRE_DEFS: -DDEF1;-DDEF2;-DDEF3

But what's about the rc defines? Do I have to set the target properties for 
each file???

SirAnn


 Original-Nachricht 
 Datum: Tue, 18 Jan 2011 14:42:28 +0100
 Von: Andreas Pakulat ap...@gmx.de
 An: cmake@cmake.org
 Betreff: Re: [CMake] VS resource compiler preprocessor defines

 On 18.01.11 14:11:15, Sören Freudiger wrote:
  Hello
  Right now the CXX preprocessor defines are also used as the preprocessor
 defines for the resource compiler (rc). Is there a way of changing that
 behavior? We are using different preprocessor defines for cl and rc. And
 sometimes we even connot use the cxx flags for the rc compiler...
  
  Any idea?
 
 If you don't use add_definitions, but instead use set_target_properties
 with COMPILE_DEFINITIONS and set_source_properties then you should be able
 to set completely different defines for the .rc source files than the rest
 of the same target.
 
 Andreas
 
 -- 
 Never look up when dragons fly overhead.
 ___
 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

-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
___
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] VS resource compiler preprocessor defines

2011-01-18 Thread Sören Freudiger
ok. But it seems as the rc-file inherits the global defines of the project :(

set_target_properties(${MY_PROJECT} PROPERTIES COMPILE_DEFINITIONS 
${GLOBAL_DEF} )

set_source_files_properties(${MY_RC_FILE} COMPILE_DEFINITIONS RC_DEF)

--

properties of ${MY_RC_FILE} in VS 2003:

/d RC_DEF /d GLOBAL_DEF /d _WINDOWS /d NDEBUG  /d 
CMAKE_INTDIR=\Release\ /I ... /foXXX.dir\Release/my_rc_file.res

That means: I can set extra defines for rc-files, but I cannot set global 
defines that are ignoered for rc files.


What's the problem?


 Original-Nachricht 
 Datum: Tue, 18 Jan 2011 17:24:57 +0100
 Von: Andreas Pakulat ap...@gmx.de
 An: cmake@cmake.org
 Betreff: Re: [CMake] VS resource compiler preprocessor defines

 On 18.01.11 15:01:13, Sören Freudiger wrote:
  hmm.. okay. That means I have to set the target properties for the cxx
 files like this:
  
  
  add_executable( ${MY_PROJECT} WIN32 ${SOURCE_FILES} )
  set_target_properties( ${MY_PROJECT} PROPERTIES COMPILE_DEFINITIONS
 ${MY_CXX_PRE_DEFS}) 
  
  with MY_CXX_PRE_DEFS: DEF1;DEF2;DEF3
 
 Either this, or using a cmake list as MY_CXX_PRE_DEFS.
  
  But what's about the rc defines? Do I have to set the target properties
 for each file???
 
 set_source_files_properties takes a list of files, so you can specify all
 .rc files that should get different flags there.
 
 Andreas
 
 -- 
 Advancement in position.
 ___
 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

-- 
Ihr GMX Postfach immer dabei: die kostenlose GMX Mail App für Android.
Komfortabel, sicher und schnell: www.gmx.de/android

___
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

[CMake] Fixed ProjectGUID

2011-01-07 Thread Sören Freudiger
Hello
Is it possible to set the ProjectGUID by CMake? Every time I generate a vcproj 
file with CMake the ProjectGUID changes. But we need to have a fixed one 
(because other projects are including the vcproj).

Best regards
SirAnn
-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
___
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


[CMake] How to get rid off predefine XXX_EXPORTS @add_library(XXX SHARED ...)

2011-01-05 Thread Sören Freudiger
Hi
I have a problem. After running CMake (VS 2003/2008 project) there's always a 
EXPORT preprocessor define in my project setting that I don't need.

add_library(XXX SHARED ...)

-- predefine XXX_EXPORTS

I manually set this predefine in a correct way (means in upper case!). CMake 
generate something like:

testProject_EXPORTS

but it should be:

TESTPOJECT_EXPORTS

Is there a way to supress this predfine?

Best regards 
SirAnn



-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone
___
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] How to get rid off predefine XXX_EXPORTS @add_library(XXX SHARED ...)

2011-01-05 Thread Sören Freudiger
Thanks a lot! Exactly what I was looking for ;-) I really missed that chapter

 Original-Nachricht 
 Datum: Wed, 05 Jan 2011 10:12:07 +0100
 Von: Michael Wild them...@gmail.com
 An: cmake@cmake.org
 Betreff: Re: [CMake] How to get rid off predefine XXX_EXPORTS 
 @add_library(XXX SHARED ...)

 On 01/05/2011 10:05 AM, Sören Freudiger wrote:
  Hi
  I have a problem. After running CMake (VS 2003/2008 project) there's
 always a EXPORT preprocessor define in my project setting that I don't need.
  
  add_library(XXX SHARED ...)
  
  -- predefine XXX_EXPORTS
  
  I manually set this predefine in a correct way (means in upper case!).
 CMake generate something like:
  
  testProject_EXPORTS
  
  but it should be:
  
  TESTPOJECT_EXPORTS
  
  Is there a way to supress this predfine?
  
  Best regards 
  SirAnn
  
  
  
 
 Just set the target property DEFINE_SYMBOL to TESTPROJECT_EXPORTS, then
 you don't have to set it manually any more and you get rid of
 testProject_EXPORTS:
 
 set_target_properties(testProject PROPERTIES
   DEFINE_SYMBOL TESTPROJECT_EXPORTS)
 
 
 HTH
 
 Michael
 ___
 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

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
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

[CMake] how consider pre build

2009-11-25 Thread Sören Freudiger
Hi
One Problem.

There's one file in my sources that produces a cxx file in a pre build step 
(similar to qt_ui or moc, swig ...)

But the source file isn't a h,c,cxx, file. It's a .if file thus I caonnot put 
this to the project source files without getting an error.

Ok, but step by step...

#input file: file.if
#generated file: gen_file.cxx

 ADD_CUSTOM_COMMAND(OUTPUT gen_file.cxx
PRE_BUILD
COMMAND echo on \n ..\if.exe
ARGS -c++ 
 ${include_dirs} 
 ${preProcessorDefs} 
 -o gen_file.cxx 
 file.if
MAIN_DEPENDENCY file.if
DEPENDS file.if
COMMENT generating gen_file.cxx )

SET_SOURCE_FILES_PROPERTIES(gen_file.cxx PROPERTIES GENERATED 1)


lets use this stuff (LINUX gxx):

cmake
make   -- first run - generates gen_file.cxx
make clean -- gen_file.cxx gets deleted becaus eit's generated
make   -- error: gen_file.cxx : No such file or directory

On Windows with VS 200x the file.if appears in my project witout adding it 
explecitly. And the gen_file.cxx will be rebuild if missing.

How can I ensure that the cxx is rebuilded if it's missing on Linux?

Best,
 SirAnn
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
___
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


[CMake] Re - How can I change the compiler?

2009-11-22 Thread Sören Freudiger
Hi Taesoo 
We are also dealing with the mpicxx compiler.
Best way (and the cmake way of doing that) is to change the env viariables CC 
and CXX.

Because we are often switching between gxx and mpicxx, we are using bash 
scripts for that purpose:

-
#!bash
export CC=/usr/bin/gcc-4.0
export CXX=/usr/bin/g++-4.0

echo CC=$CC
echo CXX=$CXX

#echo rm CMakeCache.txt
rm CMakeCache.txt
ccmake ~/lbm/source/patch2d/testcases/serial/.
-

Best SirAnn


Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
Taesoo Kwon
Gesendet: Sonntag, 22. November 2009 09:36
An: cmake@cmake.org
Betreff: [CMake] How can I change the compiler?


I am sorry that this should be an recurring question. 
But I wasn't able to find any working solution after hours of search.

What I tried is as follows:

/root/CMakeLists.txt

set(CMAKE_CXX_COMPILER mpic++)
set(CMAKE_C_COMPILER mpicc)


project (taesoo_cmu)

add_subdirectory(BaseLib)
add_subdirectory(MainLib)
add_subdirectory(MainLib/luabind-0.7)
add_subdirectory(OgreFltk)


---

in the OgreFltk directory, project (OgreFltk) and add_executable (OgreFltk ...) 
is defined. 

cmake .
make VERBOSE=true 

revealed that I am still using c++ instead of mpic++.
What should I change?
Thanks.

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
___
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] How can I change the compiler?

2009-11-22 Thread Sören Freudiger
That's right. But on bad configured cluster systems you have a lot of different 
mpi-compilers. I don't know what changes had have been done to the findMPI 
modul. But the last version I tried wasn't satisfying.

And all you need to now are the compilers and the mpi library...

-Ursprüngliche Nachricht-
Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
James C. Sutherland
Gesendet: Sonntag, 22. November 2009 23:26
An: cmake Mailing List
Betreff: Re: [CMake] How can I change the compiler?

It is probably worth considering 
find_package( MPI )
This will not only set the MPI compilers but also defines the mpi executable, 
etc.

James


On Nov 22, 2009, at 1:36 AM, Taesoo Kwon wrote:

 I am sorry that this should be an recurring question. 
 But I wasn't able to find any working solution after hours of search.
 
 What I tried is as follows:
 
 /root/CMakeLists.txt
 
 set(CMAKE_CXX_COMPILER mpic++)
 set(CMAKE_C_COMPILER mpicc)
 
 
 project (taesoo_cmu)
 
 add_subdirectory(BaseLib)
 add_subdirectory(MainLib)
 add_subdirectory(MainLib/luabind-0.7)
 add_subdirectory(OgreFltk)
 
 
 ---
 
 in the OgreFltk directory, project (OgreFltk) and add_executable (OgreFltk 
 ...) is defined. 
 
 cmake .
 make VERBOSE=true 
 
 revealed that I am still using c++ instead of mpic++.
 What should I change?
 Thanks.
 ___
 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

___
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


-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
___
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] string REGEX question

2009-11-21 Thread Sören Freudiger
Hi Steve
SET(VAR C:\path\to\foo) 
-”\p” and “\f” are interpreted as escape sequences

Setting VAR via CMake GUI it is internally interpreted as:
C:\\path\\to\\foo

That means you have to do following to obtain what you want to:

SET(INPUT_VAR C:\\path\\to\\foo) #or just set this variable via the interface
message(STATUS ${INPUT_VAR})

string(REGEX REPLACE   OUTPUT_VAR ${INPUT_VAR}) #each \\ == 
\
message(STATUS ${OUTPUT_VAR})

C:\\path\\to\\foo

(internally again: C:pathtofoo)

Best,
 SirAnn


Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
Steven Wilson
Gesendet: Samstag, 21. November 2009 02:13
An: CMake mailing list
Betreff: [CMake] string REGEX question

I have the following string in a variable C:\path\to\foo

I want to do something like the following:

string(REGEX REPLACE \\  OUTPUT_VAR ${INPUT_VAR})

where INPUT_VAR contains the original string.

I want the result to be:

C:\\path\\to\\foo

I'm just not seeing how to make this regular expression work.   If you have any 
suggestions I would appreciate the help!

Thanks in advance,

Steve

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
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

[CMake] set_target_properties - compile flags problem

2009-11-21 Thread Sören Freudiger
Hello
I'm in big trouble. I cannot change the cxx compile flags as I want.

binary project for VS 2008 - example:
...
ADD_EXECUTABLE( project ${source_files} )
SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS_DEBUG   /MTd)
SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS_RELEASE /MT)
- the resulting flag in my project is still /MD for ALL configrations

changing the flag like:
ADD_EXECUTABLE( project ${source_files} )
SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS /MT)
- leads to /MT in my project file for ALL configurations

but this would be only a sucking workaround and I really need to have:
/MT for release and /MTd for debug

I also tried this one:
ADD_EXECUTABLE( project ${source_files} )
SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS /MT)
SET_TARGET_PROPERTIES(serial PROPERTIES COMPILE_FLAGS_DEBUG   /MTd)
SET_TARGET_PROPERTIES(serial PROPERTIES COMPILE_FLAGS_RELEASE /MT)
- still all configs have /MT only

I think the problem is the predefined CXX_FLAG of CMake /MD
Adding /MT overwrites the /MD but adding different flags for other 
configurations doesn't has any effects.

What can I do? Any clue?

Best,
SirAnn

 

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
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


[CMake] set_target_properties - compile flags problem II

2009-11-21 Thread Sören Freudiger
Okay, after using google again I figured out that unlike LINK_FLAGS_CONFIG 
the COMPILE_FLAG property does not support COMPILE_FLAG_CONFIG.

Changing the global CMAKE_CXX_FLAGS_CONFIG for that purpose is not an option 
because I need different flags for different project and different 
configurations.

The last information was from
Fri Jun 20 09:26:43 EDT 2008
by Bill.

Is there another workaround? Or will this feature be included somewhen?
Cannot be the hardest one. Should some way of copy and paste from the 
LINK_FLAGS_CONFIG :-)

-SirAnn

-Ursprüngliche Nachricht-
Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
Sören Freudiger
Gesendet: Samstag, 21. November 2009 11:34
An: cmake@cmake.org
Betreff: [CMake] set_target_properties - compile flags problem

Hello
I'm in big trouble. I cannot change the cxx compile flags as I want.

binary project for VS 2008 - example:
...
ADD_EXECUTABLE( project ${source_files} )
SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS_DEBUG   /MTd)
SET_TARGET_PROPERTIES(project PROPERTIES COMPILE_FLAGS_RELEASE /MT)
- the resulting flag in my project is still /MD for ALL configrations

changing the flag like:
ADD_EXECUTABLE( project ${source_files} ) SET_TARGET_PROPERTIES(project 
PROPERTIES COMPILE_FLAGS /MT)
- leads to /MT in my project file for ALL configurations

but this would be only a sucking workaround and I really need to have:
/MT for release and /MTd for debug

I also tried this one:
ADD_EXECUTABLE( project ${source_files} ) SET_TARGET_PROPERTIES(project 
PROPERTIES COMPILE_FLAGS /MT)
SET_TARGET_PROPERTIES(serial PROPERTIES COMPILE_FLAGS_DEBUG   /MTd)
SET_TARGET_PROPERTIES(serial PROPERTIES COMPILE_FLAGS_RELEASE /MT)
- still all configs have /MT only

I think the problem is the predefined CXX_FLAG of CMake /MD
Adding /MT overwrites the /MD but adding different flags for other 
configurations doesn't has any effects.

What can I do? Any clue?

Best,
SirAnn



--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
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


-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
___
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


[CMake] How to get ADD_DEFINITIONS variable?

2009-11-17 Thread Sören Freudiger
Hi @all
In our project we are several times adding preprocessor defines via 
ADD_DEFINITIONS.
Now I need to get these defines to add them for a ADD_CUSTOM_COMMAND (pre build 
via swig ).

The documentations says that these defines are stored in 
COMPILE_DEFINITIONS
but this variable is empty!!!

Is there any way to obtain the preprocessor defines?

Best,
SirAnn

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
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


[CMake] RE

2008-11-11 Thread Sören Freudiger
I'm using precompiled header and CMake (I just wrote an Macro).
If someone is intressted, just write me an email... It's for MSVC (7-9) only 
right now!

- SirAnn

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Bill Hoffman
Gesendet: Dienstag, 11. November 2008 16:02
An: Yves Martelli
Cc: cmake@cmake.org
Betreff: Re: [CMake] Precompiled headers

Yves Martelli wrote:
 Sorry to ask again, but speeding up my build would really help me and my 
 colleagues in the context of a continuous build...
 
 Does CMake support precompiled headers when generating Makefiles?
 

Not directly, but it can be done.  It is very compiler/platform 
specific...  I know some projects have gotten it to work with some tool 
chains.  I do not have a an example right now.


-Bill
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

-- 
Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: 
http://www.gmx.net/de/go/multimessenger
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] //adding and changing compiler flags - best way

2008-11-09 Thread Sören Freudiger
No idea??? Problem in my solution is: user defined flags via gui are vanished 
at configure...

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Sören Freudiger
Gesendet: Donnerstag, 6. November 2008 19:20
An: cmake@cmake.org
Betreff: [CMake] //adding and changing compiler flags - state of the art?

Hi
long long time ago I wrote this macro to add CXX flax:

#
###   ADD_CXX_FLAGS(flags)   ###
### flags will be added to CMAKE_CXX_FLAGS###
#
MACRO(ADD_CXX_FLAGS)
  FOREACH(arg ${ARGN})
SET(TMP ${arg}) #elsewise the Seperate command doesn't work)
SEPARATE_ARGUMENTS(TMP)
FOREACH(option ${TMP})
  STRING(REGEX REPLACE  ${option}  CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS})
  STRING(REGEX REPLACE ${option}  CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS})
  SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${option} CACHE STRING
common C++ build flags FORCE)
ENDFOREACH(option ${TMP})  
  ENDFOREACH(arg ${ARGN})
ENDMACRO(ADD_CXX_FLAGS)

And also similar macros for the different build types.
But meanwhile a lot of things changed in cmake and I like to know how others
are handling the flag stuff.

Depending on the used compiler I have e.g. a gcc43.cmake file with common
compiler flags (and one for intel9/10, mscv8/9_32/64).
We don't have time to use the check compiler flag macro at all.

Thus what's the best way to set the flags (avoiding setting them twice, etc.
pp.)?
Shall I use the set_target_properties macro?

Best
-SirAnn

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

-- 
GMX Download-Spiele: Preizsturz! Alle Puzzle-Spiele Deluxe über 60% billiger.
http://games.entertainment.gmx.net/de/entertainment/games/download/puzzle/index.html
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] //adding and changing compiler flags - state of the art?

2008-11-06 Thread Sören Freudiger
Hi
long long time ago I wrote this macro to add CXX flax:

#
###   ADD_CXX_FLAGS(flags)   ###
### flags will be added to CMAKE_CXX_FLAGS###
#
MACRO(ADD_CXX_FLAGS)
  FOREACH(arg ${ARGN})
SET(TMP ${arg}) #elsewise the Seperate command doesn't work)
SEPARATE_ARGUMENTS(TMP)
FOREACH(option ${TMP})
  STRING(REGEX REPLACE  ${option}  CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS})
  STRING(REGEX REPLACE ${option}  CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS})
  SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${option} CACHE STRING
common C++ build flags FORCE)
ENDFOREACH(option ${TMP})  
  ENDFOREACH(arg ${ARGN})
ENDMACRO(ADD_CXX_FLAGS)

And also similar macros for the different build types.
But meanwhile a lot of things changed in cmake and I like to know how others
are handling the flag stuff.

Depending on the used compiler I have e.g. a gcc43.cmake file with common
compiler flags (and one for intel9/10, mscv8/9_32/64).
We don't have time to use the check compiler flag macro at all.

Thus what's the best way to set the flags (avoiding setting them twice, etc.
pp.)?
Shall I use the set_target_properties macro?

Best
-SirAnn

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] [cmake] windows dll and TARGET_LINK_LIBRARIES

2008-10-10 Thread Sören Freudiger
Hi
How to handle windows dll dependences in CMake.


CMakeList.txt
=

ADD_LIBRARY(MY_DLL MODULE  ${ALL_SOURCES} ) #-- MSVC generates MY_DLL.dll
and one
# small MY_DLL.lib that has to
be linked
# to projects using MY_DLL.dll

ADD_EXECUTABLE(test main.cpp)
TARGET_LINK_LIBRARIES(test.exe MY_DLL) #-- CMake error. module linking not
possible

# HACK:
IF(WIN32)
  TARGET_LINK_LIBRARIES(test.exe
$(SolutionDir)$(ConfigurationName)\\${LIB_NAME}.lib) 
ENDIF()

=
  
Question:
How do I avoid the hack??

Regards,
SirAnn



  
 


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] How to decide between Release and Debug at ADD_DEFINITIONS for MSVC?

2008-07-30 Thread Sören Freudiger
Hello
I want to add _SCL_SECURE_NO_WARNINGS and _CRT_SECURE_NO_DEPRECATE at
the MSVC Release configuration only.
How can I do that?

I found the open feature request:
  http://www.vtk.org/Bug/view.php?id=6269

Is there any workaround?

  -SirAnn



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FindBoost.cmake updated on the bugtracker

2008-04-13 Thread Sören Freudiger
But be carefull... I got a lot of errors by using 4.3.0 within MinGW. OpenMP
sometimes end in a compiler segmentation fault and some templates couldn't
be resolved (although cl, intel9/10 and gcc 4.1 can do).

so: good luck

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von
Stephan Tolksdorf
Gesendet: Sonntag, 13. April 2008 12:34
An: CMake ML
Betreff: Re: [CMake] FindBoost.cmake updated on the bugtracker

Andreas Pakulat wrote:
 On 12.04.08 08:52:38, Alan W. Irwin wrote:
 On 2008-04-12 10:07+0200 Andreas Pakulat wrote:
 That's fine, but then somebody else with access to windows should
 volunteer to do that testing since MinGW is an extremely important
platform.

 Finally, from our PLplot experience, MinGW (fortunately we do have a
couple
 of developers with access to that platform) works fine if you make some
 special adjustments for its needs.  So Andreas's above statement probably
 needs to be reversed, i.e., boost and KDE need some time/effort to work
on
 MinGW.
 
 I'll be the first one to try out MinGW which comes with gcc 4.x, but
 until that is released MinGW has just too many problems to try to make
 KDE work on it for me. There actually others that use MinGW and try to
 adjust to all its quirks.

If you don't want to wait for the official MinGW release, you might be 
interested in http://www.tdragon.net/recentgcc/

Best regards,
   Stephan
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FindBoost.cmake updated on the bugtracker

2008-04-08 Thread Sören Freudiger
Hi out there
The new macro is pretty nice. 
But one section is still missing:

  IF (MSVC90)
SET (_boost_COMPILER -vc90)
  ENDIF(MSVC90)

And the option for the newest boost release ver. 1.35

So long,
SirAnn
  

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von
Andreas Pakulat
Gesendet: Dienstag, 8. April 2008 01:23
An: cmake@cmake.org
Betreff: Re: [CMake] FindBoost.cmake updated on the bugtracker

On 07.04.08 19:47:03, Timenkov Yuri wrote:
 On Monday 07 April 2008 19:37:26 Mathias Dalheimer wrote:
  Hi,
 
  as a new cmake user I am pretty impressed how painless software builds
  can be - so first of all, thanks for releasing this software.
 I came to different solution. I have to build statically with some
libraries
 (including boost), and I use following approach to force CMake
 build with static libs.
 
 The question to other gurus: is it moral/correct to use CMake this way? :)

Ok, done, new version is available in the bugreport.

Bill, any chance of getting this into the 2.6 branch?

Andreas

-- 
Do not overtax your powers.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[cmake] current_dir

2008-01-16 Thread Sören Freudiger
Hi

Is there a way to find out in which directory I am?

 

We have this kind of structure:



/proj/source/package1/a.h

/proj/source/package1/a.h

/proj/source/package1/CMakePackage.txt

/proj/source/package2/b.h

/proj/source/package2/b.cpp

/proj/source/package2/CMakePackage.txt

/proj/source/tester/CMakeLists.txt

 



 “CMakePackage.txt”

SET(SUBDIRPATH /proj/source/package1)

GLOB cpp and h file in $ SUBDIRPATH

…

 



“CMakeLists.txt”

…

INCLUDE(“/proj/source/package1/CMakePakage.txt”)

INCLUDE(“/proj/source/package2/CMakePakage.txt”)

…

 



 

Okay, is there a way for replace 

SET(SUBDIRPATH /proj/source/package1)?

 

Note: this is a simplified example

 

SirAnn

 

 

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] SUBSTRING - STRING - shorten a string variable

2007-12-03 Thread Sören Freudiger
Hello

Following problem:

 

My CMakeList.txt file is somewhere like:

E:/LBM_subversion/source/topology/amr3d/lbmd3q19/singlephase/testcases/RCF/a
ll_in_one

 

Now I want to have only the substring:

E:/LBM_subversion/source

 

Is it possible to get last string with the help of CMAKE_CURRENT_SOURCE_DIR?
I just want to know the position of “source”.  Thus I can shorten the string
stored in CMAKE_CURRENT_SOURCE_DIR very easy. I do not always  know the path
behind source/…

 

Best SirAnn

 

 

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

AW: [CMake] SUBSTRING - STRING - shorten a string variable

2007-12-03 Thread Sören Freudiger
No, it's the other way around.

e.g.
CMAKE_CURRENT_SOURCE_DIR =
E:/LBM_subversion/source/topology/amr3d/lbmd3q19/singlephase/testcases/RCF/
all_in_one

And I'm looking for
Path=E:/LBM_subversion/source/

And the keyword I'm looking for is:

/source/
That's the only keyword that's possible...
The path to source can be different and also the path to the CMakeLists.txt
(depend on the project and the machine I'm on).

So later one I'll check if the folder roost/basics exists... then the
source folder is correct. Else wise I have to set the path manually.

SirAnn

 

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Brandon Van
Every
Gesendet: Montag, 3. Dezember 2007 21:01
An: cmake@cmake.org
Betreff: Re: [CMake] SUBSTRING - STRING - shorten a string variable

On Dec 3, 2007 12:56 PM, Sören Freudiger [EMAIL PROTECTED] wrote:




 Hello

 Following problem:



 My CMakeList.txt file is somewhere like:


E:/LBM_subversion/source/topology/amr3d/lbmd3q19/singlephase/testcases/RCF/a
ll_in_one



 Now I want to have only the substring:

 E:/LBM_subversion/source



 Is it possible to get last string with the help of
CMAKE_CURRENT_SOURCE_DIR?
 I just want to know the position of source.  Thus I can shorten the
string
 stored in CMAKE_CURRENT_SOURCE_DIR very easy. I do not always  know the
path
 behind source/…

If you know the string contains ${CMAKE_CURRENT_SOURCE_DIR} then you can
do:

string(REPLACE
  ${CMAKE_CURRENT_SOURCE_DIR}
  
  relative_path ${absolute_path})

If you need to find out whether the string contains
${CMAKE_CURRENT_SOURCE_DIR} then the following will work as long as
${CMAKE_CURRENT_SOURCE_DIR} doesn't contain regex special
characters.

if(absolute_path MATCHES ^${CMAKE_CURRENT_SOURCE_DIR})
  # blah blah blah

If ${CMAKE_CURRENT_SOURCE_DIR} contains regex special characters,
you'll have to double escape them.

string(REPLACE
  \\
  
  escaped_path ${toplevel_path})
string(REGEX REPLACE
  ([][.?*+|()$^-])
  \\1
  escaped_path ${escaped_path})
if(absolute_path MATCHES ^${escaped_path})
   string(REPLACE
  ${toplevel_path}
  
  relative_path ${absolute_path})



Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] how to check if ENV exists

2007-11-16 Thread Sören Freudiger
Just a short question.

How to check if an environment variable exist?

Something like:
IF( ENV{TESTVAR} )
...

Because elsewise I get errors at $ENV{TESTVAR} if TESTVAR doesn't exist...

Best,
SirAnn



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


AW: [CMake] SOURCE_GROUP bug

2006-11-09 Thread Sören Freudiger
I just downloades the newest CVS and still have this bug :-( 



-Ursprüngliche Nachricht-
Von: Sylvain Benner [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 9. November 2006 11:06
An: Sören Freudiger; cmake@cmake.org
Betreff: Re: [CMake] SOURCE_GROUP bug

It's a known bug (#2331) and it should be fixed in the CVS.
For your information, you can find the bug entry here : 
http://public.kitware.com/Bug/bug.php?op=showbugid=2331pos=2

Sylvain

- Original Message -
From: Sören Freudiger [EMAIL PROTECTED]
To: cmake@cmake.org
Sent: Wednesday, November 08, 2006 8:20 PM
Subject: [CMake] SOURCE_GROUP bug


Hi there's a bug within SOURCE_GROUP and subfolders:

Example:

DIRS ON HDD:
\world
\world\europe
\world\europe\france\people
\world\europe\france\paris
\world\europe\france\paris\people

CMAKELIST.TXT:
SOURCE_GROUP(\\world a.cpp)
SOURCE_GROUP(\\world\\europe b.cpp)
SOURCE_GROUP(\\world\\europe\\france\\people c.cpp)
SOURCE_GROUP(\\world\\europe\\france\\paris d.cpp)
SOURCE_GROUP(\\world\\europe\\france\\paris\\people e.cpp)

WHAT WE GET IN VS8.0:
\world - a.cpp
\world\europe b.cpp
\world\europe\france\people  c.cpp e.cpp ---  error
\world\europe\france\paris d.cpp

We are missing:
\world\europe\france\paris\people

It seems that it's not possible to have two subdirs with the same name in
one branch.

Any clue?

SirAnn



--
Dipl.-Ing. Soeren Freudiger
Institut fuer ComputerAnwendungen im Bauingenieurwesen TU Braunschweig,
Pockelsstr. 3, D-38106 Braunschweig
Tel.: +49 531/391-7595,
Mobil: +49 176/210 17 444

email: [EMAIL PROTECTED]
http://www.cab.bau.tu-bs.de/
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Brad King
Gesendet: Mittwoch, 1. November 2006 18:49
An: Filipe Sousa
Cc: cmake@cmake.org
Betreff: Re: [CMake] Setting the C dialect

Filipe Sousa wrote:
 Mattias Holm wrote:
 Hi there,

 I am new to the list, so excuse me if this has been asked before.

 I am trying to figure out if there is a good way of setting the
 language dialect that you are using. For example, I am working with a
 project written in C99, and thus I need to specify this.

 Sure enough, I can use SET_SOURCE_FILES_PROPERTIES and set the
 compile flags for every C-file to -std=c99/gnu99 and at least that
 will work with GCC. Is there any way to do this portably, and without
 setting the compile flags on every source file?


 IF(CMAKE_COMPILER_IS_GNUCC)
   SET(CMAKE_C_FLAGS -std=c99)
 ENDIF()

The set should be

SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -std=c99)

-Brad
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] SOURCE_GROUP bug

2006-11-08 Thread Sören Freudiger
Hi there's a bug within SOURCE_GROUP and subfolders:

Example:

DIRS ON HDD:
\world
\world\europe
\world\europe\france\people
\world\europe\france\paris
\world\europe\france\paris\people

CMAKELIST.TXT:
SOURCE_GROUP(\\world a.cpp)
SOURCE_GROUP(\\world\\europe b.cpp)
SOURCE_GROUP(\\world\\europe\\france\\people c.cpp)
SOURCE_GROUP(\\world\\europe\\france\\paris d.cpp)
SOURCE_GROUP(\\world\\europe\\france\\paris\\people e.cpp)

WHAT WE GET IN VS8.0:
\world - a.cpp
\world\europe b.cpp
\world\europe\france\people  c.cpp e.cpp ---  error
\world\europe\france\paris d.cpp

We are missing:
\world\europe\france\paris\people

It seems that it's not possible to have two subdirs with the same name in
one branch.

Any clue?

SirAnn



--
Dipl.-Ing. Soeren Freudiger
Institut fuer ComputerAnwendungen im Bauingenieurwesen TU Braunschweig,
Pockelsstr. 3, D-38106 Braunschweig
Tel.: +49 531/391-7595,
Mobil: +49 176/210 17 444

email: [EMAIL PROTECTED]
http://www.cab.bau.tu-bs.de/
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Brad King
Gesendet: Mittwoch, 1. November 2006 18:49
An: Filipe Sousa
Cc: cmake@cmake.org
Betreff: Re: [CMake] Setting the C dialect

Filipe Sousa wrote:
 Mattias Holm wrote:
 Hi there,

 I am new to the list, so excuse me if this has been asked before.

 I am trying to figure out if there is a good way of setting the 
 language dialect that you are using. For example, I am working with a 
 project written in C99, and thus I need to specify this.

 Sure enough, I can use SET_SOURCE_FILES_PROPERTIES and set the 
 compile flags for every C-file to -std=c99/gnu99 and at least that 
 will work with GCC. Is there any way to do this portably, and without 
 setting the compile flags on every source file?
 
 
 IF(CMAKE_COMPILER_IS_GNUCC)
   SET(CMAKE_C_FLAGS -std=c99)
 ENDIF()

The set should be

SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -std=c99)

-Brad
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] SET_CXX_COMPILER

2006-02-16 Thread Sören Freudiger
Hi folks

two questions:

1. my macro:
  MACRO(SET_CXX_COMPILER compiler)
SET(CMAKE_CXX_COMPILER ${compiler} CACHE STRING C++ compiler FORCE)
  ENDMACRO(SET_CXX_COMPILER)

and my implementation:
  SET_CXX_COMPILER(distcc mpicxx)
  
results in a build.cmake file with

  distcc\ mpicxx ...

the problem is the backslash \ before the blank. How can the be avoided?
Like this I cannot execute make.

2. why does the compiler not change at the build.cmake file by changing the
C++ compiler within the advanced options in ccmake? I can set the compiler
within ccmake e.g. to gcc, but I always get the c++-compiler at the build
file?
(of course only if I am not using my SET_CXX_COMPILER macro...). 

Hoping for answers,
QuestAnn

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[cmake] variable for first run

2006-02-09 Thread Sören Freudiger
Hi
I know this question was asked long time ago and I answered it already, but
maybe there is a new solution for the problem.

I wrote a macro that adds CXX compiler flags to my existing ones: 

MACRO(ADD_CXX_FLAGS)
  FOREACH(arg ${ARGN})
SET(TMP ${arg}) #elsewise the Seperate command doesn't work)
SEPARATE_ARGUMENTS(TMP)
FOREACH(option ${TMP})
  STRING(REGEX REPLACE  ${option}  CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS})
  STRING(REGEX REPLACE ${option}  CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS})

  # 
  SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${option} CACHE STRING
common C++ build flags FORCE)
  #

ENDFOREACH(option ${TMP})  
  ENDFOREACH(arg ${ARGN})
ENDMACRO(ADD_CXX_FLAGS)

works fine, but hte problem is that these options are forced every time I am
running cmake. But sometimes I want to remove some of these flags within the
ccmake application (not via CMakeLists.txt). But of course after configure
these options are set again.
Right now I am setting an variable RUNNED_ONE_TIME at the end of the
CMakeLists.txt file and have a IF-option around ADD_CXX_FLAGS. works to, but
is not the best way. so is there a CMAKE-variable that I can ask? or some
totaly other way to avoid the second force?

Kind regards,
Soeren

--
Dipl.-Ing. Soeren Freudiger
Institut fuer ComputerAnwendungen im Bauingenieurwesen TU Braunschweig, 
Pockelsstr. 3, D-38106 Braunschweig
Tel.: +49 531/391-7595,
Mobil: +49 176/210 17 444

email: [EMAIL PROTECTED]
http://www.cab.bau.tu-bs.de/  

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake