Hi,

I'm using ExternalProject_Add to handle this situation with multiple
platforms/targets.

https://cmake.org/cmake/help/v3.7/module/ExternalProject.html

Hope this works for you.

On Mon, Dec 19, 2016 at 1:41 AM, Harshal Singhal <hrsh...@gmail.com> wrote:

> Hello,
>
> I have a VS2013 project with (many sub-projects)many targets (say a b c
> d....) in different locations, which all are generated using CMake.  I am
> using one top-level CMakeLists with commadadd_subdirectoriesand a
> CMakeLists file in each of those sub directories. So, Each sub-directory
> has a single target.
>
>  Now, Problem is - I want to change "Platform Toolset" only in one
> (sub-directory) targets (say b) from v120 to v90.
>
> I have tried the following commands in my CMakeLists.txt for that
> particular target (say b) but none of them seem to work: Please help
>
> set(CMAKE_VS_PLATFORM_TOOLSET "v90")
> set(CMAKE_GENERATOR_TOOLSET "v90")
>
> or
>
> add_definitions (-DCMAKE_VS_PLATFORM_TOOLSET = "v90")
> add_definitions (-DMAKE_GENERATOR_TOOLSET = "v90")
>
> or
>
> set_target_properties (b PROPERTIES PLATFORM_TOOLSET "v90")
>
> After trying these command - VS2013 shows the "platform toolset " as
> "v120" for "b target". Maybe it is possible with command line with -T
> option but I want to change the toolset for only one target not for the
> whole project. Any ideas how to solve this problem? or please let me know
> if it is not clear..but please help
>
> --
> Regards
> Harshal Singhal
>
> --
>
> 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
>
-- 

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

Reply via email to