Re: [CMake] Specifying name of library file on CMake command line?

2019-06-17 Thread Kyle Edwards
On Mon, 2019-06-17 at 13:47 +, Osman Zakir wrote: > I want to know how to specify the name of a library I file I want to > link against.  How do I do this?  I wanted to build a library with a > static runtime and static libs; it requires linking against a Boost > library which I did build with

Re: [CMake] Make Timeout not be a failure

2019-06-20 Thread Kyle Edwards
On Thu, 2019-06-20 at 15:45 -0400, Donald MacQueen [|] via CMake wrote: > I have a test where I start a program that I know will create some  > output that I can test. > > But I have no way to kill this program, so I let Ctest kill it with > a  > TIMEOUT. > > The next step greps the output to

Re: [CMake] Make Timeout not be a failure

2019-06-20 Thread Kyle Edwards
On Thu, 2019-06-20 at 16:47 -0400, Donald MacQueen [|] wrote: > HI Kyle, > > Where are the -D and the -P switches of add_test documented? Those are not part of add_test(), they are arguments that get passed to the CMake executable. See for details:

Re: [CMake] Combining two static libraries into one

2019-07-03 Thread Kyle Edwards
On Wed, 2019-07-03 at 18:55 +0530, vinay kumar Kotegowder wrote: >  I want to build lib2 static library with pre-built lib1 static > library. >  Does this work? > >  add_library(lib1 STATIC lib1.c) >  add_library(lib2 STATIC lib2.c) >  target_link_libraries(lib2 INTERFACE lib1) Yes, this will

[CMake] CMake APT Repository Signing Key

2019-07-03 Thread Kyle Edwards
All, The new 2020 signing key for the APT repository (https://apt.kitware.com/) has been generated for 2020, with fingerprint A8E5EF3A02600268. The 2019 key, with fingerprint C1F34CDD40CD72DA, will remain in effect until the beginning of 2020, at which point the 2020 key will go into effect. The  

Re: [CMake] Is this the rigth way to build a shared library?

2019-06-28 Thread Kyle Edwards
On Thu, 2019-06-27 at 22:24 -0700, dexter810 wrote: > This is my CMakeLists.txt which is successfully building a shared > library, I > just wanted to confirm if it's the right way and it:  > > cmake_minimum_required(VERSION 3.6) > project(main) > > > > include_directories( >

Re: [CMake] cmake - two targets that depends on single static library that should be compiled based on the target that is being built

2019-07-02 Thread Kyle Edwards
On Tue, 2019-07-02 at 14:18 +0200, ugesh reddy wrote: > Hello, > > I couldn't find any solution's for this problem even after posting > the question on Reddit/stack overflow, so I am posting it here. > > My question is as follows: > > I have a static library and two target executables, let's

Re: [CMake] Combining two static libraries into one

2019-07-02 Thread Kyle Edwards
On Tue, 2019-07-02 at 20:44 +0530, vinay kumar Kotegowder wrote: > Hi Everyone, > > I have a requirement on combining two static library into one. > Can anyone tell me how can I achieve this? > > Regards, > Vinay If you just want to make a library such that linking against that library links

Re: [CMake] Shared, static and header-only versions of library side by side.

2019-07-08 Thread Kyle Edwards
On Thu, 2019-07-04 at 00:25 +0300, Dmitry Igrishin wrote: > Hello, > > The libraries I developing can be used as a shared libraries, static > libraries or header-only libraries. > I want to let the users to: >   - install all three variants side by side; >   - choice what variant of library to

Re: [CMake] How to specify VS2017 compilers when on VS2019

2019-08-16 Thread Kyle Edwards
On Fri, 2019-08-16 at 13:54 -0400, Michael Jackson wrote: > What are the values to the -T argument that are to be used so that I > can use VS2019 but have the 2017 compilers? Rather than using a -T argument, you want to set the CC environment variable or -DCMAKE_C_COMPILER on the command line

Re: [CMake] Segger Embedded Studio generator

2019-07-30 Thread Kyle Edwards
On Tue, 2019-07-30 at 15:39 +1000, Dushara Jayasinghe wrote: > Hi all, > > I'm working on an embedded project where I'd like to use use cmake > as the build system. At the same time, the Segger Embedded Studio IDE > seems to have decent support for the target I'm working on (nice > integration

Re: [CMake] Fortran support for ninja

2019-08-07 Thread Kyle Edwards
On Wed, 2019-08-07 at 18:10 +, Deij-van Rijswijk, Menno wrote: > Hello, > > Today I was trying to use the Ninja generator for CMake on a project > containing Fortran and C++ source files. I got the error that ninja > is not supported with CMake unless a special version of ninja is used > that

Re: [CMake] add my own language-name using standard functions

2019-07-19 Thread Kyle Edwards
On Fri, 2019-07-19 at 21:30 +0100, hex wrote: > dear community, > I want to make a module for a language that is not supported by > CMake.  > are there any restrictions in using add_executable for any language > other than C / C++,  > must the build be constructed very similar to C language? > I

Re: [CMake] Header only libraries with code generated files...

2019-06-28 Thread Kyle Edwards
It sounds like you want to use the INTERFACE version of target_include_directories(): https://cmake.org/cmake/help/latest/command/target_include_directories.html What this means is "anything that links against interface library foo will also need to add these paths to its include directories."

[cmake-developers] Error handling in dashboard scripts

2018-05-25 Thread Kyle Edwards
Hi all, I'm working on a set of build scripts that use CMake and CTest, and I'm trying to figure out the best way to handle failures in CTest (I'm using a dashboard script internally.) If the configure or build step fails, I want the failure to be reported to CDash with ctest_submit(), but I

Re: [cmake-developers] Current Projects

2018-10-12 Thread Kyle Edwards
On Fri, 2018-10-12 at 14:01 -0700, George Blikas wrote: > I was looking to be a more serious contributor to CMake. Is there a > list of feature requests, or a simple enough project that I could get > started on? Hello George, Thank you for your interest in contributing to CMake! We're always happy

[cmake-developers] CMake APT Repository Signing Key

2019-07-03 Thread Kyle Edwards
All, The new 2020 signing key for the APT repository (https://apt.kitware.com/) has been generated for 2020, with fingerprint A8E5EF3A02600268. The 2019 key, with fingerprint C1F34CDD40CD72DA, will remain in effect until the beginning of 2020, at which point the 2020 key will go into effect. The  

Re: [cmake-developers] cmake-file-api and CTest

2019-07-08 Thread Kyle Edwards
On Sun, 2019-07-07 at 09:04 +, Nagy-Egri Máté Ferenc via cmake- developers wrote: > Hi! > > I am trying to cook a CTest back-end to the Test Explorer UI > extension for VS Code as a summer project and I thought of using the > new cmake-file-api for it. The docs however are understandably

Re: [CMake] Accessing ${SITE} in CTestConfig.cmake

2018-12-31 Thread Kyle Edwards via CMake
On Sat, 2018-12-29 at 09:01 -0500, Donald MacQueen [|] wrote: > My machine shows up as M6800 under Site in my remote dashboard. > > I want to use my local dashboard, so I did this in  > CTestConfigCTestConfig.cmake: > > IF (${SITE} STREQUAL "M6800") > set(CTEST_DROP_SITE "192.168.49.128") #

Re: [CMake] Accessing ${SITE} in CTestConfig.cmake

2018-12-31 Thread Kyle Edwards via CMake
On Mon, 2018-12-31 at 13:50 -0500, Donald MacQueen [|] wrote: > Thanks very much Kyle. I guess I am not real clear about when vars > should be used as var versus ${var}. Generally speaking, you use var when setting a variable, and ${var} when reading its value. It's a lot like how shell variables

Re: [CMake] Help with non-standard use of CMake

2018-12-31 Thread Kyle Edwards via CMake
On Mon, 2018-12-31 at 16:16 -0500, Donald MacQueen [|] via CMake wrote: > First, CMake is quite impressive. Nice job. > > I am using it in a non-standard way where I set a bunch of variables > and  > then go straight to CTest thatI installs our software and then runs  > several hundred tests on

Re: [CMake] Help with non-standard use of CMake

2019-01-02 Thread Kyle Edwards via CMake
On Wed, 2019-01-02 at 12:01 -0500, Donald MacQueen [|] wrote: > I looked at the example of Using ctest and cdash without cmake  > (https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Using-CTE > ST-and-CDASH-without-CMAKE#steercmake)  > and I think I will try to go in that direction.

Re: [CMake] CPack and WIX: Preselected components

2019-01-17 Thread Kyle Edwards via CMake
Micha, Unfortunately, the WiX generator does not currently support component installation, which is what's needed to make the INSTALL_TYPES argument work. We would welcome a merge request which adds this support. Kyle On Thu, 2019-01-17 at 19:28 +0100, Micha Renner wrote: > With the NSIS

[CMake] CMake QtTest integration

2019-01-15 Thread Kyle Edwards via CMake
Hello all, I recently wrote a set of scripts to integrate QtTest into CMake, similar to the work that Matthew Woehlke did with Google Test a while back. The script that I wrote runs the test executable in the post- build stage, records the list of tests in the executable, and generates a CTest

Re: [CMake] Help with non-standard use of CMake

2019-01-02 Thread Kyle Edwards via CMake
On Tue, 2019-01-01 at 16:55 -0500, Donald MacQueen [|] wrote: > No. CMakelists.txt does nothing but download the correct installer > (32 or 64 bit) from our server, set a bunch of variables, and then > run CTest.  I invoke the InstallShield installer from a command line > in a CTest. > There is no

[CMake] Ubuntu CMake Repository Now Available

2019-04-05 Thread Kyle Edwards via CMake
All, I am pleased to announce that Kitware is now offering an officially-supported set of Ubuntu packages for CMake. These CMake packages can be installed with apt-get, just like other Ubuntu packages. We currently support Ubuntu 16.04 and 18.04. The following packages are available: * cmake -

Re: [CMake] Generate and install a file

2019-03-28 Thread Kyle Edwards via CMake
On Thu, 2019-03-28 at 14:58 -0400, Norton Allen wrote: > because mygeneratedfile is not a 'target', and I can't make it into a > target with add_custom_target() because that's talking about > something else entirely (commands that will be run unconditionally, > not based on dependencies) What

Re: [CMake] Generate and install a file

2019-03-28 Thread Kyle Edwards via CMake
On Thu, 2019-03-28 at 16:07 -0400, Norton Allen wrote: > Kyle, > What you say makes sense, and I can even understand why > add_custom_target might do that, but I cannot get this to actually > work. Here is a minimal CMakeLists.txt. mysourcefile is just and > empty file. > I have these files in

Re: [CMake] Generate and install a file

2019-03-28 Thread Kyle Edwards via CMake
On Thu, 2019-03-28 at 15:26 -0400, Norton Allen wrote: > On 3/28/2019 3:11 PM, Kyle Edwards wrote: > > On Thu, 2019-03-28 at 14:58 -0400, Norton Allen wrote: > > > because mygeneratedfile is not a 'target', and I can't make it > > > into a target with add_custom_targ

Re: [CMake] Install without building unittests

2019-03-28 Thread Kyle Edwards via CMake
You could build CMake with -DBUILD_TESTING=OFF. This will skip the unit tests altogether. Kyle On Thu, 2019-03-28 at 02:24 +, Scott Bloom wrote: > Note, Im running from inside visual studio…  I do realize for a > makefile based system, I can run make install from inside the > executable’s

Re: [CMake] Generate and install a file

2019-03-28 Thread Kyle Edwards via CMake
On Thu, 2019-03-28 at 16:38 -0400, Norton Allen wrote: > Related to that, I noticed in another thread the mention of > 'CMAKE_SKIP_INSTALL_ALL_DEPENDENCY'. If that were set in this case, > how could I indicate that install depends on mygeneratedtarget? There is no way to do this. C/C++ targets

Re: [CMake] Remove a custom command added with add_custom_command( POST_BUILD ...)

2019-03-05 Thread Kyle Edwards via CMake
On Tue, 2019-03-05 at 10:01 -0700, Olivier Gomez wrote: > Hello, > > I have been searching for a way to remove a custom command > (POST_BUILD > event) from a target in CMake but, so far, I've found nothing. > > I tried to add another custom command to override the first one but > it seems > to

Re: [CMake] make[2]: *** No rule to make target 'sql/sql_yacc.cc', needed by 'libmysqld/CMakeFiles/sql_embedded.dir/__/sql/sql_yacc.cc.o'. Stop.

2019-03-01 Thread Kyle Edwards via CMake
On Fri, 2019-03-01 at 17:49 +0800, Yu, Mingli wrote: > Hi Expert, > > I encounter build issue when compile mariadb from  > https://downloads.mariadb.org/mariadb/10.3.13/ > > > make[2]: *** No rule to make target 'sql/sql_yacc.cc', needed by  >

Re: [CMake] Question about find_packages.

2019-03-15 Thread Kyle Edwards via CMake
On Fri, 2019-03-15 at 17:03 +0100, workbe...@gmx.at wrote: > Hi everyone, > > i try to use find_packages for clang, i'm on debian and have > installed > libclang-4.0-dev package, now i've the files in > /usr/lib/llvm4-0/lib/libclang-4.0.so and the include in > /usr/lib/llvm-4.0/include/clang -

Re: [CMake] [ANNOUNCE] CMake 3.14.0 available for download

2019-03-14 Thread Kyle Edwards via CMake
On Thu, 2019-03-14 at 14:37 -0400, Sean McBride wrote: > On Thu, 14 Mar 2019 11:58:16 -0400, Robert Maynard via CMake said: > > > > > I am happy to announce that CMake 3.14.0 is now available for > > download at: > >  https://cmake.org/download/ > Pi version on Pi Day.  Nicely done!  :)  

Re: [CMake] cpack_add_component

2019-03-11 Thread Kyle Edwards via CMake
On Mon, 2019-03-11 at 17:59 +0100, Micha Renner wrote: > In CPack I can add a component with cpack_add_component and describe > the component with the additional arguments of the macro. > I can also describe the component if I use the varibales of type > CPACK_COMPONENT__XXX (e.g. >

Re: [CMake] CMake Project Generation Speedup

2019-03-20 Thread Kyle Edwards via CMake
On Wed, 2019-03-20 at 16:57 -0400, J. Caleb Wherry wrote: > I was also surprised when "cmake --trace" gave 0 information related > to the generate step. I assume this is expected behavior? The purpose of --trace is to debug CMake scripts. No scripts get run during the generate step, so yes, this

Re: [CMake] Fwd: Re: Question about CMAKE_MODULE_PATH

2019-02-18 Thread Kyle Edwards via CMake
On Mon, 2019-02-18 at 17:04 +0100, workbe...@gmx.at wrote: > > > > Forwarded Message > Subject: Re: [CMake] Question about CMAKE_MODULE_PATH > Date: Mon, 18 Feb 2019 16:58:26 +0100 > From: workbe...@gmx.at > To: Kyle Edwards > >

Re: [CMake] Question about set

2019-02-18 Thread Kyle Edwards via CMake
On Mon, 2019-02-18 at 17:59 +0100, Andreas Naumann wrote: > Hey, > > I would introduce a list with the allowed values and introduce a > macro  > "checked_set", which tests the setting or aborts. > > Regards, > Andreas" > > Am 18.02.19 um 15:06 schrieb workbe...@gmx.at: > > > > Hi everyone, > >

Re: [CMake] Question about CMAKE_MODULE_PATH

2019-02-18 Thread Kyle Edwards via CMake
On Mon, 2019-02-18 at 16:50 +0100, workbe...@gmx.at wrote: > Doesn't the content of CMAKE_MODULE_PATH should also include the path > to  > the default modules ?? The default modules are automatically checked by CMake, independently of the contents of CMAKE_MODULE_PATH. They should not normally be

Re: [CMake] undefined reference to `_exit'

2019-02-01 Thread Kyle Edwards via CMake
Hex, Can you see what else is in /opt/arm-none-eabi/lib/thumb/v7- ar/fpv3/hard (the same directory as libc.a)? There might be another system library that contains the _exit() implementation that isn't being linked due to your use of the -nostartfiles flag. Kyle On Fri, 2019-02-01 at 22:15 +,

Re: [CMake] FindOpenSSL.cmake

2019-02-01 Thread Kyle Edwards via CMake
Andrew, FindOpenSSL provides an "OPENSSL_ROOT_DIR" variable which allows you to specify the root directory of your installation (assuming a traditional layout within that directory.) Hopefully this will do what you need. Good luck! Kyle On Fri, 2019-02-01 at 16:18 -0500, Andrew Bell wrote: > I

Re: [CMake] Ubuntu CMake Repository Now Available

2019-04-09 Thread Kyle Edwards via CMake
; libcurl4? > > > > Unfortunately libcurl3 conflicts with libcurl4, and I need to keep > > the later installed for packages that depend on it. The Ubuntu- > > provided CMake package appears to be built against libcurl4. > > > > Steven > > > > On 4/5/19

Re: [CMake] find_program usage

2019-06-04 Thread Kyle Edwards via CMake
On Tue, 2019-06-04 at 19:38 +0530, vinay kumar Kotegowder wrote: > The original intent of the snippet is to find the required tool chain > (On windows : arm-none-eabi-gcc.exe or armclang.exe; On Linix : > arm-none-eabi-gcc or armclang) path which can later be used to build > the project. > > I

Re: [CMake] find_program usage

2019-06-04 Thread Kyle Edwards via CMake
On Tue, 2019-06-04 at 19:07 +0530, vinay kumar Kotegowder wrote: > Hi Everyone, > > This is simple code running on Windows machine: > > if(WIN32) >   message(STATUS "On windows") >   find_program(_TOOL >   arm-none-eabi-gcc.exe >   PATHS "C:" > ) > endif() >

Re: [CMake] Question about regular expressions

2019-06-04 Thread Kyle Edwards via CMake
On Tue, 2019-06-04 at 16:39 +0200, Steven Truppe wrote: > Hi everyone, > > > i had the same question a few days ago but can't rember the command > (and > can't find it in the cods): > > I have a regular expression like "WITH_LIB${lib}_EXAMPLE_([A-Za-z]+)" > and i want the get the content of the

Re: [CMake] General question:

2019-06-04 Thread Kyle Edwards via CMake
On Tue, 2019-06-04 at 17:11 +0200, Steven Truppe wrote: > I want the output not to be 'in' but 'glade' ... > > > On 04.06.19 17:10, Steven Truppe wrote: > > > > Hi everyone again, > > > > > > i've the following code: > > > > https://paste.debian.net/1086040/ > > > > and i just try to

Re: [CMake] General question about regex

2019-06-04 Thread Kyle Edwards via CMake
On Tue, 2019-06-04 at 19:19 +0200, Steven Truppe wrote: > I found the solution: >     get_cmake_property(_vars VARIABLES) >     foreach(_var ${_vars}) >         string(TOUPPER ${lib} lib_upper) >         if(_var MATCHES "^WITH_LIB_${lib_upper}_EXAMPLE_([A-Za- > z]+)$") >        

Re: [CMake] Question about IF and STRINGS

2019-05-31 Thread Kyle Edwards via CMake
On Fri, 2019-05-31 at 19:07 +0200, Steven Truppe wrote: > The problem is the line: > if(${_var} MATCHES "^WITH_LIB_([AZaz]+)$") > cmake_print_variables(CMAKE_MATCH_0) > > doesn't print me any output ... There are two problems with the following line: if(${_var} MATCHES "^WITH_LIB_([AZaz]+)$")

Re: [CMake] Troubles with macros and STREQUAL

2019-05-31 Thread Kyle Edwards via CMake
On Fri, 2019-05-31 at 20:43 +0200, Steven Truppe wrote: > macro(bsAddLibrary lib) > # get all WITH_LIB varables >     message(STATUS "${lib}") > > get_cmake_property(_variables VARIABLES) > foreach(_var ${_variables}) > > -->> (${lib} is "WITH_LIB_GLAD" but allways return

[CMake] CMake Release Candidate Builds Available for Ubuntu

2019-06-07 Thread Kyle Edwards via CMake
All, I am pleased to announce that we are now offering Ubuntu builds of the CMake release candidates, in addition to the production releases. The first available release candidate build is 3.15.0~rc1-0kitware2. If you would like to receive release candidate builds, follow the instructions at

Re: [CMake] Split Build and Test Pipelines

2019-05-10 Thread Kyle Edwards via CMake
On Fri, 2019-05-10 at 12:06 -0500, Dustyn Blasig wrote: > Hi All, > > I'm curious if anyone has had success allowing two testing paths to > coexist well. > > Currently, we are using CTest to run our test executables with `make > test`. However, on our Jenkins system, the build machines have the

Re: [CMake] Can arguments in an command invocation end in a line comment?

2019-05-07 Thread Kyle Edwards via CMake
On Wed, 2019-05-08 at 00:52 +0300, Maris Razvan wrote: I apologize for the spelling error in the subject of this thread. I was told that this sentence actually states that lines inside a (single) command argument cannot end in a line comment. I initially thought that "Command Arguments" in this

Re: [CMake] modify cmake build arguments

2019-08-29 Thread Kyle Edwards via CMake
On Thu, 2019-08-29 at 18:27 +0100, hex wrote: > hello community, > > CMake builds a C project with gcc -o target_name. I have a compiler > very similar to GCC and I am trying configure CMake C language for > it. > > The compiler does not support the -o argument when linking objects. I > wonder

Re: [CMake] The connection to cmake-server was terminated unexpectedly [cms-client] cmake-server exited with status null (SIGSEGV)

2019-09-04 Thread Kyle Edwards via CMake
On Wed, 2019-09-04 at 14:12 -0400, fdk17 wrote: > https://github.com/microsoft/vscode-cmake-tools/issues/752 states > that it ran out of stack and the log shows what looks like to be > involved with a recursive loop in some CMakeLists.txt.  A call depth > of 27491 seems a bit excessive. > > After

Re: [CMake] Should header files be listed for a target?

2019-09-11 Thread Kyle Edwards via CMake
On Wed, 2019-09-11 at 21:40 +0300, Avraham Shukron wrote: > Hi! > > I'm pretty new to cmake and I came across a question which I could > not find any information about in the official documentation or blog > posts. > > When adding a target through add_library / add_executable - should > the

Re: [CMake] Should header files be listed for a target?

2019-09-11 Thread Kyle Edwards via CMake
On Wed, 2019-09-11 at 22:00 +0300, Avraham Shukron wrote: > > > On Wed, Sep 11, 2019 at 9:49 PM Kyle Edwards m> wrote: > > You can list them or not list them. CMake will recognize them as > > header > > files and ignore them (not attempt to compile them.) It'

Re: [CMake] Setting RPATH lookup on macOS

2019-09-11 Thread Kyle Edwards via CMake
On Wed, 2019-09-11 at 17:33 -0400, Michael Jackson wrote: > Already looked on google and at the CMake documentation but > everything listed does not seem to work so here is the setup. > > I am using MKL and I have a home grown FindMKL since there isn’t an > official one. Inside that is the

Re: [CMake] Preventing multiple definitions of metaObject methods

2019-09-13 Thread Kyle Edwards via CMake
On Fri, 2019-09-13 at 15:25 +, Stephen Morris wrote: > Suppose I have a class that derives from QObject, and contains the > Q_OBJECT macro in its header file. When I compile it using AUTOMOC > enabled, a "moc_myClass.cpp" file is created; if I manually include > that file at the end of my

Re: [CMake] try_compile with multiple include directories

2019-09-09 Thread Kyle Edwards via CMake
On Sun, 2019-09-08 at 14:07 -0500, Isuru Fernando wrote: > Hello, > > I can use the following to get try_compile to include one directory. > > CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=dir1" > > How do you use try_compile when I have multiple directories to pass > to it? > > Isuru Use a semicolon:

Re: [CMake] building cmake without the bootstrap step

2019-12-12 Thread Kyle Edwards via CMake
On Thu, 2019-12-12 at 15:15 +0100, René J.V. Bertin wrote: > Hi, > > If I understand correctly, configuring CMake for building means > bootstrapping a basic version of itself which is then run on the > included CMakeLists.txt file. That takes a lot of time > (comparatively) which begs the

Re: [CMake] Policy Stack within Macros/Functions

2019-10-21 Thread Kyle Edwards via CMake
On Sun, 2019-10-20 at 19:25 +0200, Sérgio Agostinho wrote: > Hey everyone, > > I’m shipping a config file for my library and inside I set push/pop > specific policies so that me and the consumers of my library can > target different policies without us clashing against each other. > However I’m

Re: [CMake] Concerning ninja -v

2019-10-21 Thread Kyle Edwards via CMake
On Mon, 2019-10-21 at 10:23 +0100, David Aldrich wrote: > I have a simple CMake project with subdirectories: > > cmake_minimum_required(VERSION 3.10) > project(MyProject VERSION 1.0.0) > > set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON") > > add_subdirectory(say-hello) >

Re: [CMake] Policy Stack within Macros/Functions

2019-10-21 Thread Kyle Edwards via CMake
On Mon, 2019-10-21 at 21:39 +0200, Sérgio Agostinho wrote: > For further users with the same problem, you likely do not need need > to invoke cmake_policy(PUSH)/cmake_policy(POP) from your shipped > Config file, so just delete them and set whatever policies you need > without concerns. This has

Re: [CMake] Testing an exe with gtest - possible?

2019-11-20 Thread Kyle Edwards via CMake
On Wed, 2019-11-20 at 00:54 +0100, cen wrote: > Hi > > I have an existing c++ exe project which I want to test with gtest. > I  > have not yet found an easy way to keep the project as is and test it  > directly since gtest insists (obviously) to link against the code > being  > tested. I found a

Re: [CMake] Single library with both shared and static binaries

2019-09-25 Thread Kyle Edwards via CMake
On Tue, 2019-09-24 at 23:41 +0300, Avraham Shukron wrote: > Hi! > > I have a library which I want to distribute in both shared object and > static library forms. > Is there a modern way to do it without creating two completely > separate library targets? > Since I want to be a good CMake citizen

Re: [CMake] HOWTO declare component inter-dependencies in multi-component packages

2019-10-03 Thread Kyle Edwards via CMake
On Thu, 2019-10-03 at 17:08 -0400, stefan wrote: > Yes, that is exactly what I'm trying to do, but it doesn't seem to > have any effect. That is, `dpkg --info ...` doesn't list the > additional dependency, and correspondingly, running `apt-get install > ...` on the component package file will

Re: [CMake] HOWTO declare component inter-dependencies in multi-component packages

2019-10-03 Thread Kyle Edwards via CMake
On Thu, 2019-10-03 at 16:30 -0400, stefan wrote: > Hi Kyle, > thanks for the quick followup. > On 2019-10-03 4:23 p.m., Kyle Edwards wrote: > > Please take a look at cpack_add_component(): > > https://cmake.org/cmake/help/latest/module/CPackComponent.html > I'm not sure wh

Re: [CMake] HOWTO declare component inter-dependencies in multi-component packages

2019-10-03 Thread Kyle Edwards via CMake
On Thu, 2019-10-03 at 16:15 -0400, stefan wrote: > I'm trying to generate (debian) packages for a project of mine using > cmake. I need to generate multiple components ("runtime", > "development", etc.). What is the expected way to have the > "development" package depend on the "runtime" package ?

Re: [CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-11 Thread Kyle Edwards via CMake
On Fri, Oct 11, 2019 at 1:36 AM Alan W. Irwin wrote: > The source files that have COMPILE_OPTIONS, COMPILE_DEFINITIONS, > COMPILE_FLAGS, or INCLUDE_DIRECTORIES will also be skipped." This is by far the most likely reason. We added this restriction because we don't want files that have different

Re: [CMake] build step is not thread-safe for CMake

2020-02-10 Thread Kyle Edwards via CMake
On Mon, 2020-02-10 at 12:49 +, hex wrote: > hello, > > My build step is not thread-safe (the instruction in the COMMAND > part). Every build step depends on one source file: > > add_custom_command( >     DEPENDS on_source.file >     OUTPUT >    

Re: [cmake-developers] Referencing all sources in compile command

2018-12-31 Thread Kyle Edwards via cmake-developers
On Sun, 2018-12-30 at 13:09 -0800, Saleem Abdulrasool wrote: > Hi, > > I was looking at supporting Swift as a language in CMake.  I know > that CMake has some preliminary support that assumes that you are > building on macOS with Xcode.  I am trying to support building swift > libraries and

[cmake-developers] Idea for Multi-Toolchain Support

2018-12-17 Thread Kyle Edwards via cmake-developers
Hello everyone, One of the things that's long been requested of CMake is the ability to have multiple toolchains - for instance, one host toolchain and one cross toolchain, so that "utilities" needed for build can be built with the host toolchain and then the "real" software can be built with the

Re: [cmake-developers] Idea for Multi-Toolchain Support

2018-12-17 Thread Kyle Edwards via cmake-developers
Eric, Thanks for the feedback. See comments below. On Mon, 2018-12-17 at 22:06 +0100, Eric Noulard wrote: > > This has some common design issue as my proposal: > > enable_cross_target(...) > > for which Eike has valuable doubt: > >

Re: [cmake-developers] Idea for Multi-Toolchain Support

2018-12-18 Thread Kyle Edwards via cmake-developers
On Tue, 2018-12-18 at 06:14 -0500, frodak17 wrote: > What first cross my mind with '"utilities" needed for build' is when > you have to build the cross-compiler in the first place before you > build anything for the target. > If so how do you handle verification of the tool-chain can build a >

Re: [cmake-developers] Idea for Multi-Toolchain Support

2018-12-24 Thread Kyle Edwards via cmake-developers
On Sat, 2018-12-22 at 16:57 +0100, Torsten Robitzki wrote: > What I’m still missing is support to define dependencies between > different targets (build by different toolchains), so that I can > describe that I require a tool that is build with the HostToolChain, > to generate a file that is

Re: [cmake-developers] Idea for Multi-Toolchain Support

2018-12-18 Thread Kyle Edwards via cmake-developers
On Tue, 2018-12-18 at 16:12 -0500, frodak17 wrote: > So it would be something like project( [TOOLCHAIN > [LANGUAGES] [...]) where TOOLCHAIN > and its supported languages can be repeated for each tool chain. i.e > project(whatever TOOLCHAIN default LANGUAGES cpp TOOLCHAIN cross > LANGUAGES c) I

Re: [cmake-developers] Idea for Multi-Toolchain Support

2018-12-19 Thread Kyle Edwards via cmake-developers
On Tue, 2018-12-18 at 20:53 -0500, frodak17 wrote: > I have thought about it which is why I asked.  The original > assumption of one toolchain per CMake project is being extended. So > why not think of extending the build type.  Sure it's simpler to > ignore the build type. However, it doesn't

Re: [cmake-developers] Idea for Multi-Toolchain Support

2018-12-18 Thread Kyle Edwards via cmake-developers
On Tue, 2018-12-18 at 14:10 -0500, frodak17 wrote: > How does this work with multiple languages and the project() command > and enable_language() commands? Both project() and enable_language() could be extended with an optional TOOLCHAIN argument. > For instance you want to use the host c++

Re: [cmake-developers] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Kyle Edwards via cmake-developers
On Thu, 2019-01-24 at 12:31 -0800, Venedict Tchistopolskii wrote: > Nevermind, fixed the cmake-gui. Ah OK, then disregard my response. > Would be nice to know how to triger the proper install/release config from > VStudio, atm I do this: > cmake . --target install --config Release This looks

Re: [cmake-developers] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Kyle Edwards via cmake-developers
On Thu, 2019-01-24 at 12:25 -0800, Venedict Tchistopolskii wrote: > The install command auto-installs release right? > How do I trigger this 'install' from VStudio? > Is building in VStudio enough before install? > e.g. generate solution -> build in VStudio -> run install > command in CLI?

[cmake-developers] Ubuntu CMake Repository Now Available

2019-04-05 Thread Kyle Edwards via cmake-developers
All, I am pleased to announce that Kitware is now offering an officially-supported set of Ubuntu packages for CMake. These CMake packages can be installed with apt-get, just like other Ubuntu packages. We currently support Ubuntu 16.04 and 18.04. The following packages are available: * cmake -

Re: [cmake-developers] Ubuntu CMake Repository Now Available

2019-04-08 Thread Kyle Edwards via cmake-developers
On Sat, 2019-04-06 at 10:56 +0200, Rolf Eike Beer wrote: > Nice! > > The magic spell for TravisCI is: > > addons: >   apt: > sources: >   - sourceline: 'deb https://apt.kitware.com/ubuntu/ xenial main' > key_url: 'https://apt.kitware.com/keys/kitware-archive-2019.a > sc' >

Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
On Fri, 2019-01-25 at 09:18 +0100, Gößwein Matthias / eeas gmbh wrote: > However, the manual does not describe this behavior, maybe it should > be > mentioned there. > (https://cmake.org/cmake/help/v3.13/manual/cmake-gui.1.html) Even better, perhaps we should add explicit -B and -S options the

Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
Syntax wrong or something? > > VT > > > On Fri, Jan 25, 2019 at 6:52 AM Kyle Edwards > m> wrote: > > On Fri, 2019-01-25 at 09:18 +0100, Gößwein Matthias / eeas gmbh > > wrote: > > > However, the manual does not describe this behavior, maybe it > > sh

Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
On Fri, 2019-01-25 at 13:23 -0800, Venedict Tchistopolskii wrote: > Get 2 CMake projects. > > Get CMake GUI to 'configure' one of them. Close/re-open and it will > automatically point to this configured project source and build > locations, regardless of what build/version/cmake-gui.exe you use. 

Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
On Fri, 2019-01-25 at 12:55 -0800, Venedict Tchistopolskii wrote: > Cherry picked and tested. Works great, thank you! Great, glad to hear it! > Now, if only the source/build path would stick around, without requiring > config to be triggered. :P Can you clarify what you mean by this? Kyle > --

Re: [cmake-developers] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Kyle Edwards via cmake-developers
Venedict, To relocate cmake.exe, it's not sufficient to just copy the executable - you have to install all of the modules along with it. You do this by running the "install" target. Given a path to where you want to put CMake, you would build it like this: cmake C:/Path/To/CMake/Source

Re: [cmake-developers] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Kyle Edwards via cmake-developers
eed a toolchain file. Hope this helps! Kyle On Thu, 2019-01-24 at 12:09 -0500, Kyle Edwards wrote: > Venedict, > > To relocate cmake.exe, it's not sufficient to just copy the > executable - you have to install all of the modules along with it. > You do this by running the "inst

Re: [cmake-developers] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Kyle Edwards via cmake-developers
On Thu, 2019-01-24 at 09:23 -0800, Venedict Tchistopolskii wrote: > I was building it via VStudio and generating the solution via CMake, > is that wrong? Nope! You're building it just fine. The only problem is in the installation - you were installing cmake.exe without all of the external files it

Re: [cmake-developers] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Kyle Edwards via cmake-developers
On Thu, 2019-01-24 at 12:36 -0500, Kyle Edwards wrote: > cmake --build . --target install > windeployqt C:/Path/To/Where/I/Want/To/Install/bin/cmake.exe Oops - this should obviously be C:/Path/To/Where/I/Want/To/Install/bin/cmake-gui.exe. Kyle-- Powered by www.kitware.com Please keep me

Re: [cmake-developers] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Kyle Edwards via cmake-developers
On Thu, 2019-01-24 at 09:27 -0800, Venedict Tchistopolskii wrote: > Er, lemme clarify. > > Can cmake-gui.exe be built along with cmake if using the install path > setting? I currently use windeployqt to handle gui dependencies. Yes, like I mentioned, just build with BUILD_QtDialog=ON. You can

Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
On Fri, 2019-01-25 at 14:06 -0800, Venedict Tchistopolskii wrote: > Could you clarify on saving the build-directory section? > > I'm not sure how it knows which cache or build directory to load. In > my setup here the issue I noted applies even if build directory is > generated on both

[cmake-developers] CMake Release Candidate Builds Available for Ubuntu

2019-06-07 Thread Kyle Edwards via cmake-developers
All, I am pleased to announce that we are now offering Ubuntu builds of the CMake release candidates, in addition to the production releases. The first available release candidate build is 3.15.0~rc1-0kitware2. If you would like to receive release candidate builds, follow the instructions at

Re: [cmake-developers] escape double quote in generated file

2019-08-30 Thread Kyle Edwards via cmake-developers
On Fri, 2019-08-30 at 17:36 +0300, Eugene Karpov wrote: > Hello all, > > I'm working on a cross platform project. On Ubuntu I would like to > save all the compiler options, definitions and other complier related > stuff to a generated file to use it later for precompiled header > generation. > My

Re: [cmake-developers] escape double quote in generated file

2019-08-30 Thread Kyle Edwards via cmake-developers
On Fri, 2019-08-30 at 17:54 +0300, Eugene Karpov wrote: > I've tried this. But then it fails to compile due to `INTERFACE > API=${API_EXPORT_MACRO}` target compile definition. Ah right, you want the file contents to be escaped while the compile flags are not. My next suggestion was going to be to

Re: [cmake-developers] escape double quote in generated file

2019-08-30 Thread Kyle Edwards via cmake-developers
On Fri, 2019-08-30 at 19:01 +0300, Eugene Karpov wrote: > Not working too. > The failed lines in a generated make file looks like this > --- > CMakeFiles/mkflags_test: >         /usr/bin/cmake -DDEFINITIONS=- > DAPI=__attribute__((visibility("default"))) - >

Re: [cmake-developers] Proposal: Using smart pointers to own dynamically allocated memory

2019-09-13 Thread Kyle Edwards via cmake-developers
On Fri, 2019-09-13 at 22:08 +0530, Tushar Maheshwari wrote: > Hi, > > I am a C++ developer and a modern-C++ enthusiast. In the interest of > modernizing the codebase, I propose using smart pointers to handle > dynamically allocated memory. I would like to get the feedback from > the developers if

Re: [cmake-developers] generator expression in install RENAME

2019-10-29 Thread Kyle Edwards via cmake-developers
Please open an issue at https://gitlab.kitware.com/cmake/cmake/issues to request support for this. Kyle On Tue, Oct 29, 2019 at 9:58 AM Nicolas Desprès wrote: > > Hi there, > > Generator expressions are allowed in the FILES/PROGRAMS and DESTINATION part > of an install command. > > Would that