[CMake] add_custom_command with per configuration options

2012-06-26 Thread LaViolette, Alan
I need to add a custom command that varies based on configuration (with VS2010 
generator).  As far as I can see no direct way exists to do this.

I have tried to use the $<..> syntax but it keeps quoting the expression

add_library (foo SHARED IMPORTED GLOBAL)
set_target_properties(foo PROPERTIES
IMPORTED_CONFIGURATIONS "Release;Debug"
IMPORTED_LOCATION_RELEASE "/D /E /F"
IMPORTED_LOCATION_DEBUG " /A /B /C"
)
ADD_CUSTOM_COMMAND(
OUTPUT "${afile}.cpp"
COMMAND ${MY_PROGRAM} ARGS $  -c "${afile}"
)
Results in
"myprogram.exe" "/A /B /C" "-c" "file.in"

I believe I will now have to write a batch script from cmake as a helper to 
correctly set the correct arguments.

Has anyone else had this issue?  Does anyone have a solution that worked?

Would it be possible to expand the $<...> syntax to support any cmake variable 
and do things like $>?

--
Alan LaViolette
Software Engineering Consultant
OVERWATCH
An Operating Unit of Textron Systems
21660 Ridgetop Circle, Suite 110
Sterling, VA 20166
Office: (703) 437-7651 x 2419
Fax: (703) 437-0039
alaviole...@overwatch.textron.com
www.overwatch.com

"WARNING: Documents that can be viewed, printed or retrieved from this E-Mail 
may contain technical data whose export is restricted by the Arms Export 
Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration 
Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not 
be exported, released or disclosed to non-U.S. persons (i.e. persons who are 
not U.S. citizens or lawful permanent residents ["green card" holders]) inside 
or outside the United States, without first obtaining an export license.  
Violations of these export laws are subject to severe civil, criminal and 
administrative penalties."

--

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] CMAKE_SUPPRESS_REGENERATION in VS2010

2012-06-04 Thread LaViolette, Alan
I have 2.8.8.  and I see the same line in my CMakeCache.txt.  



-Original Message-
From: Ben Medina [mailto:ben.med...@gmail.com] 
Sent: Monday, June 04, 2012 12:47 PM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMAKE_SUPPRESS_REGENERATION in VS2010

This works for me with CMake 2.8.8 and VS2010. I have this in my CMakeCache.txt:

CMAKE_SUPPRESS_REGENERATION:BOOL=ON

And the ZERO_CHECK target does not appear.

Which version of CMake are you using? I vaguely recall that this
feature was broken a few releases back.

- Ben

On Fri, Jun 1, 2012 at 8:31 AM, LaViolette, Alan
 wrote:
> I am porting our product over to use cmake vs2010 and am experiencing issues
> with the automatic regeneration (2010 does not seem to like its projects
> changing while open), so I would like to just turn it off.
>
>
>
> I have put the CMAKE_SUPPRESS_REGENERATION variable in and still get the
> ZERO_CHECK and the CMakeList.txt dependencies in the project files.  What do
> I need to get this to work.
>
>
>
> I am setting it from the command line so it is defined first thing
>
> "-DCMAKE_SUPPRESS_REGENERATION:BOOL=1"
>
>
>
> Thanks
>
>
>
> --
>
> Alan LaViolette
>
> Software Engineering Consultant
>
> OVERWATCH
>
> An Operating Unit of Textron Systems
>
> 21660 Ridgetop Circle, Suite 110
>
> Sterling, VA 20166
>
> Office: (703) 437-7651 x 2419
>
> Fax: (703) 437-0039
>
> alaviole...@overwatch.textron.com
>
> www.overwatch.com
>
>
>
> "WARNING: Documents that can be viewed, printed or retrieved from this
> E-Mail may contain technical data whose export is restricted by the Arms
> Export Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export
> Administration Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq.
> and which may not be exported, released or disclosed to non-U.S. persons
> (i.e. persons who are not U.S. citizens or lawful permanent residents
> ["green card" holders]) inside or outside the United States, without first
> obtaining an export license.  Violations of these export laws are subject to
> severe civil, criminal and administrative penalties."
>
>
>
>
> --
>
> 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


Re: [CMake] Using a variable as a method name

2012-06-01 Thread LaViolette, Alan
Thanks that works great.  I just wrote an eval macro that does that

From: David Cole [mailto:david.c...@kitware.com]
Sent: Friday, June 01, 2012 11:22 AM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] Using a variable as a method name

Not directly, but as a workaround, you could write that into a file, and then 
include the file.

i.e.:

file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/tmp.cmake" "BAR_${FOO}(arg1 arg2)")
include(${CMAKE_CURRENT_BINARY_DIR}/tmp.cmake)

You may need to do some quoting and/or escaping to get things working depending 
on how complex arg1 and arg2 are in reality.

This sort of "eval" functionality has been requested (and denied ;-) before:

  http://public.kitware.com/Bug/view.php?id=4034
  http://public.kitware.com/Bug/view.php?id=11845


HTH,
David


On Fri, Jun 1, 2012 at 11:02 AM, LaViolette, Alan 
mailto:alaviole...@overwatch.textron.com>> 
wrote:
Hello

I would like to call a method based on a variable name such as

set( FOO "123")
BAR_${FOO}(arg1 arg2)

would do the same as

BAR_123(arg1 arg2)

Does any way exist to do this in CMake, such as a call() or eval() command?


--
Alan LaViolette
Software Engineering Consultant
OVERWATCH
An Operating Unit of Textron Systems
21660 Ridgetop Circle, Suite 110
Sterling, VA 20166
Office: (703) 437-7651 x 2419
Fax: (703) 437-0039
alaviole...@overwatch.textron.com<mailto:alaviole...@overwatch.textron.com>
www.overwatch.com<http://www.overwatch.com>

"WARNING: Documents that can be viewed, printed or retrieved from this E-Mail 
may contain technical data whose export is restricted by the Arms Export 
Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration 
Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not 
be exported, released or disclosed to non-U.S. persons (i.e. persons who are 
not U.S. citizens or lawful permanent residents ["green card" holders]) inside 
or outside the United States, without first obtaining an export license.  
Violations of these export laws are subject to severe civil, criminal and 
administrative penalties."


--

Powered by www.kitware.com<http://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

[CMake] CMAKE_SUPPRESS_REGENERATION in VS2010

2012-06-01 Thread LaViolette, Alan
I am porting our product over to use cmake vs2010 and am experiencing issues 
with the automatic regeneration (2010 does not seem to like its projects 
changing while open), so I would like to just turn it off.

I have put the CMAKE_SUPPRESS_REGENERATION variable in and still get the 
ZERO_CHECK and the CMakeList.txt dependencies in the project files.  What do I 
need to get this to work.

I am setting it from the command line so it is defined first thing
"-DCMAKE_SUPPRESS_REGENERATION:BOOL=1"

Thanks

--
Alan LaViolette
Software Engineering Consultant
OVERWATCH
An Operating Unit of Textron Systems
21660 Ridgetop Circle, Suite 110
Sterling, VA 20166
Office: (703) 437-7651 x 2419
Fax: (703) 437-0039
alaviole...@overwatch.textron.com
www.overwatch.com

"WARNING: Documents that can be viewed, printed or retrieved from this E-Mail 
may contain technical data whose export is restricted by the Arms Export 
Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration 
Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not 
be exported, released or disclosed to non-U.S. persons (i.e. persons who are 
not U.S. citizens or lawful permanent residents ["green card" holders]) inside 
or outside the United States, without first obtaining an export license.  
Violations of these export laws are subject to severe civil, criminal and 
administrative penalties."

--

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] Using a variable as a method name

2012-06-01 Thread LaViolette, Alan
Hello

I would like to call a method based on a variable name such as

set( FOO "123")
BAR_${FOO}(arg1 arg2)

would do the same as

BAR_123(arg1 arg2)

Does any way exist to do this in CMake, such as a call() or eval() command?


--
Alan LaViolette
Software Engineering Consultant
OVERWATCH
An Operating Unit of Textron Systems
21660 Ridgetop Circle, Suite 110
Sterling, VA 20166
Office: (703) 437-7651 x 2419
Fax: (703) 437-0039
alaviole...@overwatch.textron.com
www.overwatch.com

"WARNING: Documents that can be viewed, printed or retrieved from this E-Mail 
may contain technical data whose export is restricted by the Arms Export 
Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration 
Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not 
be exported, released or disclosed to non-U.S. persons (i.e. persons who are 
not U.S. citizens or lawful permanent residents ["green card" holders]) inside 
or outside the United States, without first obtaining an export license.  
Violations of these export laws are subject to severe civil, criminal and 
administrative penalties."

--

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] CMake and VS2010

2011-05-20 Thread LaViolette, Alan
ok I found the issue.   

 

Visual Studio 10 requires the GUID in the solution file to be upper
case.  I was generating these guids in my cmake script as lower case
(needed to keep them from changing because of intel compiler
integration.)   I fixed my script to TOUPPER the UUIDs and everything is
good.

 

I guess VS2005 did not care about the GUID case (as it shouldn't)

 

Thanks.

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, May 19, 2011 3:50 PM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake and VS2010

 

So, if you just open the solution and do a "Build Solution" doesn't it
build everything you'd expect?



On Thu, May 19, 2011 at 3:01 PM, LaViolette, Alan
 wrote:

yes I have CMake 2.8.4

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, May 19, 2011 10:30 AM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake and VS2010

 

Are you using CMake 2.8.4? There were several VS 2010 related fixes that
went into 2.8.4.

 

On Thu, May 19, 2011 at 10:00 AM, LaViolette, Alan
 wrote:

I am working on converting to Visual Studio 2010 and the solution file
that CMake generates does not have any of the target marked for build.
I have to open up the "Configuration Manager" and select the build box
for all my projects.

 

When I save the modified solution back out I get additional
"Debug|Win32.Build.0 = Debug|Win32" lines for all my projects. 

 

 

Is this a CMake/Visual Studio configuration error on my part or an issue
with CMake solution generation?

 

Thanks,

Alan

 

 


___
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

Re: [CMake] CMake and VS2010

2011-05-19 Thread LaViolette, Alan
ZERO_CHECK runs then all other report

 

"Project not selected to build for this solution configuration"

 

I think cmGlobalVisualStudio8Generator::WriteProjectConfigurations is
getting passed false for partOfDefaultBuild on all my projects.  What
controls this parameter.   I am going to start a build of CMake and see
what is going on.   

 

 

BTW. The Visual Studio 2005 build of the same cmake project works fine.

 

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, May 19, 2011 3:50 PM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake and VS2010

 

So, if you just open the solution and do a "Build Solution" doesn't it
build everything you'd expect?



On Thu, May 19, 2011 at 3:01 PM, LaViolette, Alan
 wrote:

yes I have CMake 2.8.4

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, May 19, 2011 10:30 AM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake and VS2010

 

Are you using CMake 2.8.4? There were several VS 2010 related fixes that
went into 2.8.4.

 

On Thu, May 19, 2011 at 10:00 AM, LaViolette, Alan
 wrote:

I am working on converting to Visual Studio 2010 and the solution file
that CMake generates does not have any of the target marked for build.
I have to open up the "Configuration Manager" and select the build box
for all my projects.

 

When I save the modified solution back out I get additional
"Debug|Win32.Build.0 = Debug|Win32" lines for all my projects. 

 

 

Is this a CMake/Visual Studio configuration error on my part or an issue
with CMake solution generation?

 

Thanks,

Alan

 

 


___
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

Re: [CMake] CMake and VS2010

2011-05-19 Thread LaViolette, Alan
yes I have CMake 2.8.4

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, May 19, 2011 10:30 AM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake and VS2010

 

Are you using CMake 2.8.4? There were several VS 2010 related fixes that
went into 2.8.4.

 

On Thu, May 19, 2011 at 10:00 AM, LaViolette, Alan
 wrote:

I am working on converting to Visual Studio 2010 and the solution file
that CMake generates does not have any of the target marked for build.
I have to open up the "Configuration Manager" and select the build box
for all my projects.

 

When I save the modified solution back out I get additional
"Debug|Win32.Build.0 = Debug|Win32" lines for all my projects. 

 

 

Is this a CMake/Visual Studio configuration error on my part or an issue
with CMake solution generation?

 

Thanks,

Alan

 

 


___
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

[CMake] CMake and VS2010

2011-05-19 Thread LaViolette, Alan
I am working on converting to Visual Studio 2010 and the solution file
that CMake generates does not have any of the target marked for build.
I have to open up the "Configuration Manager" and select the build box
for all my projects.

 

When I save the modified solution back out I get additional
"Debug|Win32.Build.0 = Debug|Win32" lines for all my projects. 

 

 

Is this a CMake/Visual Studio configuration error on my part or an issue
with CMake solution generation?

 

Thanks,

Alan

 

 

___
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] Post-Generate commands

2010-05-26 Thread LaViolette, Alan
What I really want to do is generate Intel Compiler project files for
the just generated visual studio project files.  I am trying to do this
without any cmake C++ changes at the moment.  I can generate the icproj
during the cmake run but have no way to generate a new solution, so I
have a script that will process the solution and projects to generate a
new solution.  I know this is not a great solution but it currently
works.

 

Alan

 

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Wednesday, May 26, 2010 1:18 PM
To: LaViolette, Alan
Cc: a.neundorf-w...@gmx.net; cmake@cmake.org
Subject: Re: [CMake] Post-Generate commands

 

This is not easily possible without modifying the CMake C++ code. (Where
it would be fairly easy to add a feature like this...) Perhaps filing a
feature request for a "post generate action" would be the best thing to
do.

However, in the meantime, you could always add a custom target that
executes your stuff at the beginning of the build, and make all other
top level targets depend on it with add_dependencies. Would that work in
your case?



On Wed, May 26, 2010 at 1:05 PM, LaViolette, Alan
 wrote:

I want to run at the end of cmake.  I am generating some additional
files that are more complex then configure can do. But I need the
generated projects and solutions.



-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net]
Sent: Wednesday, May 26, 2010 12:16 PM
To: cmake@cmake.org
Cc: LaViolette, Alan
Subject: Re: [CMake] Post-Generate commands

On Wednesday 26 May 2010, LaViolette, Alan wrote:
> Is it possible to have cmake run a command after all files are
> generated?   I want to do some additional build environment setup.


You can use add_custom_command(TARGET your_target POST_BUILD COMMAND
...) to
have commands executed after a target has been built.

Or do you mean at the end of the cmake run ?
What do you want to do ? Please let us know some more details, otherwise
it's
hard to help.

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://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

Re: [CMake] Post-Generate commands

2010-05-26 Thread LaViolette, Alan
I want to run at the end of cmake.  I am generating some additional
files that are more complex then configure can do. But I need the
generated projects and solutions.


-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Wednesday, May 26, 2010 12:16 PM
To: cmake@cmake.org
Cc: LaViolette, Alan
Subject: Re: [CMake] Post-Generate commands

On Wednesday 26 May 2010, LaViolette, Alan wrote:
> Is it possible to have cmake run a command after all files are
> generated?   I want to do some additional build environment setup.


You can use add_custom_command(TARGET your_target POST_BUILD COMMAND
...) to 
have commands executed after a target has been built.

Or do you mean at the end of the cmake run ?
What do you want to do ? Please let us know some more details, otherwise
it's 
hard to help.

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


[CMake] Post-Generate commands

2010-05-25 Thread LaViolette, Alan
Is it possible to have cmake run a command after all files are
generated?   I want to do some additional build environment setup.

 

--

Alan LaViolette

Software Engineering Consultant

Overwatch(r)

An Operating Unit of Textron Systems

21660 Ridgetop Circle, Suite 110

Sterling, VA 20166

Office: 703 437-7651  x 2416

Fax: 703 437-0039

alaviole...@overwatch.textron.com
 

www.overwatch.com

___
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] Intermediate manifest files.

2009-02-03 Thread LaViolette, Alan
I am now setting up the NMake generator.  I have everything working
correctly except for an issue with the manifests.  

 

I have my build environment setup to build out of source and all
intermediate file go to the CMake directory. This works for all files
but the manifest, I get a *.embed.manifest, *.embed.manifest.res,
*.intermediate.manifest, and *.resource.txt in my output directory.  I
would prefer to not have these placed in the output.   

 

Does any workaround exists to place these in the intermediate files
directory?

 

Thanks

Alan.

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

Re: [CMake] How To change VS2005 Output directory

2009-02-03 Thread LaViolette, Alan
thanks that works.  It is kind of a hack would be nice if the generator
had an option to not append the configuration.

 



From: philiplow...@gmail.com [mailto:philiplow...@gmail.com] On Behalf
Of Philip Lowman
Sent: Monday, February 02, 2009 9:36 PM
To: LaViolette, Alan
Cc: Tyler; cmake@cmake.org
Subject: Re: [CMake] How To change VS2005 Output directory

 

On Mon, Feb 2, 2009 at 7:13 PM, LaViolette, Alan
 wrote:

I changed the CMAKE_CFG_INTDIR and I don't see any changes in the
project file.

I am setting
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY
${CMAKE_SOURCE_DIR}/bin/${CMAKE_PLATFORM})


The problem is The VS2005 generator always appends the configuration
name so I get
if
   CMAKE_SOURCE_DIR = x:\
   CMAKE_PLATFORM = Win32

X:/bin/Win32/Debug

I would like to have

X:/bin/Win32_Debug

or for plugins

X:/bin/Win32/Debug/Handlers

I would like to have

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY
${CMAKE_SOURCE_DIR}/bin/${CMAKE_PLATFORM}/$(ConfigurationName))

The $(ConfigurationName) is expanded by the IDE to the configuration
like Debug or Release.


It sounds like you need the PREFIX hack.  Not sure if it will make the
"Win32_Debug" folder for you though, you'll have to try it and see.

http://www.mail-archive.com/cmake@cmake.org/msg14083.html



-- 
Philip Lowman

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

Re: [CMake] How To change VS2005 Output directory

2009-02-02 Thread LaViolette, Alan
I changed the CMAKE_CFG_INTDIR and I don't see any changes in the
project file.

I am setting
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY
 ${CMAKE_SOURCE_DIR}/bin/${CMAKE_PLATFORM})


The problem is The VS2005 generator always appends the configuration
name so I get
if
CMAKE_SOURCE_DIR = x:\
CMAKE_PLATFORM = Win32

X:/bin/Win32/Debug

I would like to have

X:/bin/Win32_Debug

or for plugins

X:/bin/Win32/Debug/Handlers

I would like to have

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY
 ${CMAKE_SOURCE_DIR}/bin/${CMAKE_PLATFORM}/$(ConfigurationName))

The $(ConfigurationName) is expanded by the IDE to the configuration
like Debug or Release.

Thanks
Alan.

-Original Message-
From: Tyler [mailto:ty...@cryptio.net] 
Sent: Monday, February 02, 2009 6:39 PM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] How To change VS2005 Output directory

On Mon, Feb 02, 2009 at 05:00:13PM -0500, LaViolette, Alan wrote:
> From what I can see the VCLinker OutputFile is set to the value of
> target.GetDirectory(configName).
> (cmLocalVisualStudio7Generator::OutputBuildTool() ~ line 953)
> 
> The cmTarget::GetDirectory() calls
> cmGlobalVisualStudio7Generator::AppendDirectoryForConfig() when a
config
> name is passed in
> 
> The cmGlobalVisualStudio7Generator::AppendDirectoryForConfig()
> implementation always appends the name.
> 
> From what I can see in the source code the VS2005 generator will place
> the config name in the output path always.
> 
> The CMAKE_CFG_INTDIR is only used in cmTarget::NormalGetLocation() the
> VS2005 generator does not call this from what I can tell

By investigate, I just meant read the docs :p:

#  CMAKE_CFG_INTDIR: Build time configuration directory for project.

This is a variable that is used to provide developers access to the
intermediate directory used by Visual Studio IDE projects. For example,
if building Debug all executables and libraries end up in a Debug
directory. On UNIX systems this variable is set to ".". However, with
Visual Studio this variable is set to $(IntDir). $(IntDir) is expanded
by the IDE only. So this variable should only be used in custom commands
that will be run during the build process. This variable should not be
used directly in a CMake command. CMake has no way of knowing if Debug
or Release will be picked by the IDE for a build type. If a program
needs to know the directory it was built in, it can use CMAKE_INTDIR.
CMAKE_INTDIR is a C/C++ preprocessor macro that is defined on the
command line of the compiler. If it has a value, it will be the
intermediate directory used to build the file. This way an executable or
a library can find files that are located in the build directory. 


Maybe I don't understand what you're trying to do?

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


Re: [CMake] How To change VS2005 Output directory

2009-02-02 Thread LaViolette, Alan
>From what I can see the VCLinker OutputFile is set to the value of
target.GetDirectory(configName).
(cmLocalVisualStudio7Generator::OutputBuildTool() ~ line 953)

The cmTarget::GetDirectory() calls
cmGlobalVisualStudio7Generator::AppendDirectoryForConfig() when a config
name is passed in

The cmGlobalVisualStudio7Generator::AppendDirectoryForConfig()
implementation always appends the name.

>From what I can see in the source code the VS2005 generator will place
the config name in the output path always.

The CMAKE_CFG_INTDIR is only used in cmTarget::NormalGetLocation() the
VS2005 generator does not call this from what I can tell


-Original Message-
From: Tyler Roscoe [mailto:ty...@cryptio.net] 
Sent: Monday, February 02, 2009 3:39 PM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] How To change VS2005 Output directory

On Mon, Feb 02, 2009 at 02:12:53PM -0500, LaViolette, Alan wrote:
> I would like to use the $(ConfigurationName) VS macro

Investigate CMAKE_CFG_INTDIR.

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


[CMake] How To change VS2005 Output directory

2009-02-02 Thread LaViolette, Alan
The VS2005 generator looks to always append the configuration name into
the output directory.  I have a project that I don't want this to
happen.

 

For example my output path need to look like this

 

/Build/Debug/Plugin

or

/Build/Release/Plugin

 

I would like to use the $(ConfigurationName) VS macro

 

such as

/Build/$(ConfigurationName)/Plugin

 

Does CMake have a way to do this?

 

Thanks

Alan

 

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

[CMake] configure_file and Source Control

2008-10-08 Thread LaViolette, Alan

Hi, I am using configure_file to produce some build varient files.  I
need to have these output files in source control so other developers
can access the results without needeing to build this library.  To do
this I need to checkout the output file before it is writen.  

Does anyone have a recommendation on how to do this?  Could CMake
support this?  

My current idea is to run a script that will check them out before I run
CMake.  I would prefer if I only checked them out if they are modified.

I was also thinking I could have configure_file generate a temp file and
create a custom build rule to checkout and copy the file to the real
name.


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