Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-30 Thread Michael Hertling
On 03/25/2011 03:36 PM, David Doria wrote: >> Could you post the output of "make VERBOSE=1"? >> >> On *nix, the following CMakeLists.txt works as expected: >> The output of "make VERBOSE=1" contains: >> >>> .../c++ -DUNIX -o .../SetTargetProperties.cxx.o -c >>> .../SetTargetProperties.cxx > > It

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-25 Thread David Doria
> Could you post the output of "make VERBOSE=1"? > > On *nix, the following CMakeLists.txt works as expected: > The output of "make VERBOSE=1" contains: > >> .../c++ -DUNIX -o .../SetTargetProperties.cxx.o -c >> .../SetTargetProperties.cxx It is working properly now. I must not have done a 'make

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread Michael Hertling
On 03/24/2011 11:39 PM, David Doria wrote: > On Thu, Mar 24, 2011 at 11:31 AM, Yuri Timenkov wrote: >> Use COMPILE_FLAGS target property. Like this: >> >> set_target_properties(Exec2 PROPERTIES COMPILE_FLAGS "/flag1 /flag2") >> >> You can see full list of properties in CMake documentation. Note th

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread Michael Hertling
On 03/24/2011 03:44 PM, David Doria wrote: > Is there a way to explicitly set the CMAKE_CXX_FLAGS for a particular > executable? That is, if I set CMAKE_CXX_FLAGS and then have a > add_executable line, then change CMAKE_CXX_FLAGS and then have another > add_executable, will the first set of CMAKE_C

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread David Doria
On Thu, Mar 24, 2011 at 11:31 AM, Yuri Timenkov wrote: > Use COMPILE_FLAGS target property. Like this: > > set_target_properties(Exec2 PROPERTIES COMPILE_FLAGS "/flag1 /flag2") > > You can see full list of properties in CMake documentation. Note that > compiler flags may be also set for particular

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread Yuri Timenkov
Use COMPILE_FLAGS target property. Like this: set_target_properties(Exec2 PROPERTIES COMPILE_FLAGS "/flag1 /flag2") You can see full list of properties in CMake documentation. Note that compiler flags may be also set for particular source file with set_source_files_properties command. On Thu, Ma

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread David Doria
On Thu, Mar 24, 2011 at 10:44 AM, David Doria wrote: > Is there a way to explicitly set the CMAKE_CXX_FLAGS for a particular > executable? That is, if I set CMAKE_CXX_FLAGS and then have a > add_executable line, then change CMAKE_CXX_FLAGS and then have another > add_executable, will the first set

[CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread David Doria
Is there a way to explicitly set the CMAKE_CXX_FLAGS for a particular executable? That is, if I set CMAKE_CXX_FLAGS and then have a add_executable line, then change CMAKE_CXX_FLAGS and then have another add_executable, will the first set of CMAKE_CXX_FLAGS be applied to the first executable and the