Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread CHEVRIER, Marc
Alternate solution is to define following environment variables: * CC=cl.exe * CXX=cl.exe In this case, CMake will search these compilers rather than the standard choices (starting with c++ and g++ for C++ language). And you don’t have any longer constraints about your environment. Marc On

Re: [CMake] generator expression for set_target_properties

2015-12-02 Thread Attila Krasznahorkay
Hi Lloyd, You mean like: if( ${CMAKE_BUILD_TYPE} STREQUAL "Release" ) set_target_properties( myexec PROPERTIES WIN32_EXECUTABLE TRUE ) endif() ? Or would you like the build configuration to change in this respect when you change the build type in the IDE? This latter may not be possible to

[CMake] generator expression for set_target_properties

2015-12-02 Thread Lloyd
Hi, We have a cmake file for Qt project. We want to hide the console from release build. For that we are using ADD_EXECUTABLE(myexec ${MYEXEC_SRC} ) SET_TARGET_PROPERTIES(myexec PROPERTIES WIN32_EXECUTABLE true) Is it possible for me to set this property only for the release build? I am using c

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread iosif neitzke
Ah, okay, thanks. From cmake-gui the solution equivalent would be selecting the Ninja generator but specifying native compilers (cl.exe for this example) instead of using the default native compilers? -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http:

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Bill Hoffman
On 12/2/2015 8:22 PM, iosif neitzke wrote: Isn't this what Generator Toolset selection is for? ex. cmake -G Ninja -T v140 http://cmake.blogspot.com/2013/05/cmake-2811-available-for-download.html No, that is for telling the VS IDE which tool set to use. It has no effect on the Ninja generator.

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-02 Thread Ruslan Baratov via CMake
On 03-Dec-15 04:34, Alexander Neundorf wrote: On Wednesday, December 02, 2015 12:27:42 Ruslan Baratov wrote: > On 02-Dec-15 05:13, Alexander Neundorf wrote: ... > > well, the RPATH entry was not designed to be patched, > > RPATH designed to be patched. And since it's a third time I'm making

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread iosif neitzke
Isn't this what Generator Toolset selection is for? ex. cmake -G Ninja -T v140 http://cmake.blogspot.com/2013/05/cmake-2811-available-for-download.html -- 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 v

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-02 Thread Roger Leigh
On 30/11/2015 02:10, Dmitry Marakasov wrote: Hi! This question bugs me for a long time so I though maybe someone has a solution. I have a project which includes an application and some data for it. An application needs to know path to its data files, so I pass it via compiler definition: ADD_DEF

Re: [CMake] Best way to handle application data path for local run vs. installation

2015-12-02 Thread Alexander Neundorf
On Wednesday, December 02, 2015 12:27:42 Ruslan Baratov wrote: > On 02-Dec-15 05:13, Alexander Neundorf wrote: ... > > well, the RPATH entry was not designed to be patched, > > RPATH designed to be patched. And since it's a third time I'm making > this statement please provide any arguments if you

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Bill Hoffman
On 12/2/2015 2:39 PM, Robert Dailey wrote: For some reason Strawberry Perl installed gcc/g++ to my PATH. I removed this and it's finding MSVC 19 now. Thanks. Could also set CC and CXX to cl before running CMake. -- Bill Hoffman Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 bill.hoff

[CMake] [ANNOUNCE] CMake 3.4.1 available for download

2015-12-02 Thread Robert Maynard
We are pleased to announce that CMake 3.4.1 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! - Changes in 3.4.1 since 3.4.0: Bill Ho

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Robert Dailey
On Wed, Dec 2, 2015 at 1:37 PM, Robert Dailey wrote: > On Wed, Dec 2, 2015 at 1:29 PM, Nils Gladitz wrote: >> On 02.12.2015 20:18, Robert Dailey wrote: >>> >>> Is there a way to generate for Ninja using MSVC toolchain? If so, how >>> do I do that? Do I need a toolchain file? >> >> >> You can sele

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Robert Dailey
On Wed, Dec 2, 2015 at 1:29 PM, Nils Gladitz wrote: > On 02.12.2015 20:18, Robert Dailey wrote: >> >> Is there a way to generate for Ninja using MSVC toolchain? If so, how >> do I do that? Do I need a toolchain file? > > > You can select the Ninja generator (e.g. cmake -G Ninja) while running cmak

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Nils Gladitz
On 02.12.2015 20:18, Robert Dailey wrote: Is there a way to generate for Ninja using MSVC toolchain? If so, how do I do that? Do I need a toolchain file? You can select the Ninja generator (e.g. cmake -G Ninja) while running cmake from the desired Visual Studio command line environment. Nils

[CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Robert Dailey
Is there a way to generate for Ninja using MSVC toolchain? If so, how do I do that? Do I need a toolchain file? -- 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 commu

[CMake] CPack-NSIS Start menu item not created

2015-12-02 Thread Lloyd
Hi, Hi I am using CMake for building and packing on Windows. I have a root cmake file and the subfolders contains executable and other modules. I am writing the packing code in the root cmake file and executable contained in a subfolder. My executable name is myexec, and I want to create start me