----- Original Message -----
> On 15/09/14 12:01, Daniele E. Domenichelli wrote:
> > Is there an alternative variable for CMAKE_CFG_INTDIR that can be used
> > in configure time, instead of build time?
> >
> > If there is not, is it safe to assume that the name of the directory is
> > equal to the name of the current configuration?
>
>
> Bump?
>
> What I would like to do is to be able to change
> CMAKE_RUNTIME_OUTPUT_DIRECTORY (and similar variables) with something
> that contains the current configuration directory, i.e.
>
> set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .../${CMAKE_CFG_INTDIR}/...)
>
> but unfortunately CMAKE_CFG_INTDIR causes an error when targets are
> installed.
As expected, that will not work. CMAKE_CFG_INTDIR can give the build tool a
variable, which is expanded by the build tool, and you've effectively added
another configuration directory level.
You could end up with a directory such as
/path/to/Debug/Debug/
>
> I was able to have something that works as I expect by doing this:
>
> foreach(config ${CMAKE_CONFIGURATION_TYPES})
> string(TOUPPER ${config} CONFIG)
> set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG} .../${config}/...)
> endforeach()
>
> But I was wondering if it is safe to assume that the current directory
> is always "${config}" or if it might be different.
>
That should work just fine. CMAKE_CONFIGURATION_TYPES gives you a list of all
possible configuration that can be chosen at build time.
Clint
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake