Re: [CMake] How to use Ninja on Windows with MSVC?

2019-05-22 Thread Robert Dailey
save a lot of work in setting up environment and/or hunting down vcvars batch files. On Wed, May 22, 2019 at 10:44 AM Michael Ellery wrote: > > > > > On May 22, 2019, at 6:58 AM, Robert Dailey wrote: > > > > From the command line, I want to generate Ninja bui

[CMake] How to use Ninja on Windows with MSVC?

2019-05-22 Thread Robert Dailey
>From the command line, I want to generate Ninja build scripts that utilize a specific version of MSVC compiler. Basically I'd like the combination of `-G"Visual Studio 15 2017"` with regards to its ability to find the C and C++ compiler on the system via registry/environment variables, and

Re: [CMake] [cmake-developers] libc++ usage in CMake with Clang?

2018-08-21 Thread Robert Dailey
On Tue, Aug 21, 2018 at 3:47 PM Craig Scott wrote: > Excuse the brevity, but it sounds like you might be looking for the > CXX_EXTENSIONS target property (sorry if I've misunderstood your problem, let > me know why it isn't appropriate if so). See the following article for a more > complete

Re: [cmake-developers] [CMake] libc++ usage in CMake with Clang?

2018-08-21 Thread Robert Dailey
On Tue, Aug 21, 2018 at 3:47 PM Craig Scott wrote: > Excuse the brevity, but it sounds like you might be looking for the > CXX_EXTENSIONS target property (sorry if I've misunderstood your problem, let > me know why it isn't appropriate if so). See the following article for a more > complete

Re: [CMake] libc++ usage in CMake with Clang?

2018-08-21 Thread Robert Dailey
ed in the answer to Robert's question. I've been using > > set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++") > > but it seems like there should be a more elegant approach. > > -tk > > -Original Message- > From: CMake On Behalf Of Robert Dailey

Re: [cmake-developers] [CMake] libc++ usage in CMake with Clang?

2018-08-21 Thread Robert Dailey
ed in the answer to Robert's question. I've been using > > set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++") > > but it seems like there should be a more elegant approach. > > -tk > > -Original Message- > From: CMake On Behalf Of Robert Dailey

[CMake] libc++ usage in CMake with Clang?

2018-08-20 Thread Robert Dailey
Is the only way to use libc++ to muck with compile flags? Or is there a proper find module for this or something? Is there a more CMake-esque way of specifying the STL library to use with the toolchain? -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

Re: [cmake-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Robert Dailey
On Thu, Jul 19, 2018 at 1:17 PM, Robert Dailey wrote: > On Thu, Jul 19, 2018 at 1:13 PM, Robert Dailey > wrote: >> On Thu, Jul 19, 2018 at 1:07 PM, Brad King wrote: >>> On 07/19/2018 11:58 AM, Robert Dailey wrote: >>>> I can't remember where I heard about

Re: [cmake-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Robert Dailey
On Thu, Jul 19, 2018 at 1:13 PM, Robert Dailey wrote: > On Thu, Jul 19, 2018 at 1:07 PM, Brad King wrote: >> On 07/19/2018 11:58 AM, Robert Dailey wrote: >>> I can't remember where I heard about these CMake variables, but in one >>> of my toolchain f

Re: [cmake-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Robert Dailey
On Thu, Jul 19, 2018 at 1:07 PM, Brad King wrote: > On 07/19/2018 11:58 AM, Robert Dailey wrote: >> I can't remember where I heard about these CMake variables, but in one >> of my toolchain files I do this: >> >> set( CMAKE_C_COMPILER_ARG1 -m32 ) >>

[cmake-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Robert Dailey
I can't remember where I heard about these CMake variables, but in one of my toolchain files I do this: set( CMAKE_C_COMPILER_ARG1 -m32 ) set( CMAKE_CXX_COMPILER_ARG1 -m32 ) On the [cmake variables][1] page, these are not documented. I expected an entry somewhere like `CMAKE__COMPILER_ARG<#>`

[CMake] Parallel builds and auto generated header files

2018-07-19 Thread Robert Dailey
I have a Version.hpp file that I have a custom command tied to which basically runs CMake in script mode to perform configure_file() on it during build time. The reason it does this is because it builds Version.hpp using dynamic information, such as defining a macro with the current SHA1 being

[cmake-developers] Building cmake QtDialog: Can't find QT 5.11.1

2018-07-02 Thread Robert Dailey
I have QT 5.11.1 installed, I used the open source installer. It did install msvc2015 32-bit libs but not 2017. Google search shows that 2015 is ABI compatible so CMake should use that. When I generate the CMake project, it says it can't find QT version 4.x. How do I build CMake with the GUI

[cmake-developers] C# targets and content source files

2018-07-02 Thread Robert Dailey
In Visual Studio, I can add *.ico files to my C# project and in the CSPROJ XML, it shows up as a element. Is this supported in CMake for CSharp targets? -- 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

Re: [cmake-developers] Link element in C# project causing issues with binary dir

2018-06-29 Thread Robert Dailey
;layout-composer-build" as > sibling directories of each other? > > > > On Fri, Jun 29, 2018 at 4:12 PM Robert Dailey > wrote: >> >> According to the code, the logic is wrong: >> >> void cmVisualStudio10TargetGenerator::GetCSharpSourceLink( >> cm

Re: [cmake-developers] Link element in C# project causing issues with binary dir

2018-06-29 Thread Robert Dailey
CMake for checking if a file is in the CMAKE_BINARY_DIR? Or do I have to write my own code for that check? On Fri, Jun 29, 2018 at 3:08 PM, Robert Dailey wrote: > When I use configure_file() to generate AssemblyInfo.cs, which I allow > to go to the CMAKE_CURRENT_BINARY_DIR, Visual Studio 2017

[cmake-developers] Link element in C# project causing issues with binary dir

2018-06-29 Thread Robert Dailey
When I use configure_file() to generate AssemblyInfo.cs, which I allow to go to the CMAKE_CURRENT_BINARY_DIR, Visual Studio 2017 reports: Warning The file 'E:\code\layout-composer-build\Properties\AssemblyInfo.cs' could not be added to the project. Cannot add a link to the file

Re: [cmake-developers] 3.12.0-rc1: C# project outputting as a "vcxproj" (C++ project)

2018-06-26 Thread Robert Dailey
AM, Robert Dailey wrote: >> To fix this issue for now I had to do this: >> >> set_property( TARGET ${project_name} PROPERTY LINKER_LANGUAGE CSharp >> ) >> >> I don't remember having to explicitly tell CMake that the project is >> CSharp in the

Re: [cmake-developers] 3.12.0-rc1: C# project outputting as a "vcxproj" (C++ project)

2018-06-26 Thread Robert Dailey
, Jun 26, 2018 at 9:12 AM, Robert Dailey wrote: > Using 3.12.0-rc1, if I create a C# project, but use > `target_link_libraries` on it to pull in a dependency to a managed C++ > target, the C# project turns into a "vcxproj" after generation, > whereas if I remove the "ta

[cmake-developers] 3.12.0-rc1: C# project outputting as a "vcxproj" (C++ project)

2018-06-26 Thread Robert Dailey
Using 3.12.0-rc1, if I create a C# project, but use `target_link_libraries` on it to pull in a dependency to a managed C++ target, the C# project turns into a "vcxproj" after generation, whereas if I remove the "target_link_libraries()" call, it outputs as a "csproj" as I expect. Is this a known

Re: [CMake] Performance profiling for CMake scripts?

2018-06-20 Thread Robert Dailey
e set to > NEW or your cmake_minimum_required is sufficiently high, those can > have a significant improvement on configuration time. > > Polices ( both in CMake 3.1 ) > - CMP0054 'if parsing' > - CMP0053 'simplified variable reference and escape parsing' > > On Tue, Jun 19, 201

Re: [cmake-developers] [CMake] Performance profiling for CMake scripts?

2018-06-20 Thread Robert Dailey
e set to > NEW or your cmake_minimum_required is sufficiently high, those can > have a significant improvement on configuration time. > > Polices ( both in CMake 3.1 ) > - CMP0054 'if parsing' > - CMP0053 'simplified variable reference and escape parsing' > > On Tue, Jun 19, 201

[CMake] Performance profiling for CMake scripts?

2018-06-19 Thread Robert Dailey
So I noticed over the years my CMake scripts take longer and longer to configure/generate. Is there a mechanism to tell which parts of my CMake scripts are slowest? I'd like to know how to optimize my CMake scripts to reduce the time it takes to generate projects. -- Powered by www.kitware.com

[CMake] How to make RUN_TESTS build projects first?

2018-04-24 Thread Robert Dailey
I'd like RUN_TESTS to build the executable targets that are tied to add_test() commands prior to running the tests themselves. Note I'm doing this from within Visual Studio. Is there a way I can set up CMake to do this? -- Powered by www.kitware.com Please keep messages on-topic and check the

Re: [CMake] How to obtain a list of target dependencies

2018-03-12 Thread Robert Dailey
I'm going to add the CMake Dev group as well, since I asked this same question last year around May and I didn't get any response. Hoping for some help this time around. I don't see anything documented, so maybe the developers know the best approach here. On Mon, Mar 12, 2018 at 3:03 PM, Robert

Re: [cmake-developers] How to obtain a list of target dependencies

2018-03-12 Thread Robert Dailey
I'm going to add the CMake Dev group as well, since I asked this same question last year around May and I didn't get any response. Hoping for some help this time around. I don't see anything documented, so maybe the developers know the best approach here. On Mon, Mar 12, 2018 at 3:03 PM, Robert

[CMake] How to obtain a list of target dependencies

2018-03-12 Thread Robert Dailey
Sometimes I need to manually take action on the dependencies of my targets. Without keeping track of the dependencies externally using global or custom target properties, is there a way to obtain the list of targets that a target depends on? This would be the same list of targets passed to

[CMake] Confusion with range-based FOREACH logic

2018-01-23 Thread Robert Dailey
I am doing the following: ``` set( CS_THIRD_PARTY_REFERENCES Iconic.Zip ${CMAKE_CURRENT_SOURCE_DIR}/DotNetZip/Iconic.Zip.dll ) if( CS_THIRD_PARTY_REFERENCES ) list( LENGTH CS_THIRD_PARTY_REFERENCES len ) message( STATUS "len: ${len}" ) foreach( i RANGE 0 ${len} 2 )

Re: [CMake] project() with ASM fails with MSVC 19

2017-09-12 Thread Robert Dailey
Also, I am using the "Visual Studio 15 2017" generator with no other options (generating through cmake-gui on Windows) On Tue, Sep 12, 2017 at 1:33 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > Using CMake 3.9, I do this: > > cmake_minimum_required(VERSION 3.9)

[CMake] project() with ASM fails with MSVC 19

2017-09-12 Thread Robert Dailey
Using CMake 3.9, I do this: cmake_minimum_required(VERSION 3.9) project(libpng VERSION 1.6.33 LANGUAGES ASM C) I get the following error: -- The ASM compiler identification is unknown -- Didn't find assembler -- The C compiler identification is MSVC 19.11.25507.1 CMake Error at

[CMake] How to maintain compatibility with earlier versions?

2017-09-11 Thread Robert Dailey
So typically my setup is that I have the newest CMake installed, but am working with projects that set cmake_minimum_required to something like version 2.8. Will version 3.9 of CMake prevent me from using features that were introduced after 2.8? How can I make sure that someone with *actual*

Re: [CMake] configuration packages, IMPORTED targets, and global scope

2017-09-07 Thread Robert Dailey
Thanks, I am watching that discussion and will try to contribute where I can. On Thu, Sep 7, 2017 at 4:02 AM, Deniz Bahadir <dbaha...@benocs.com> wrote: > Am 06.09.2017 um 20:24 schrieb Robert Dailey: >> >> So it took me a while to figure out why find_package() calls I was &

[CMake] Configuration packages & versioning for parallel installations

2017-09-06 Thread Robert Dailey
First obvious question is: Should this even be a concern? The cmake-packages documentation doesn't really touch on versioning, but there are a couple of concerns I see when you want users to be able to install (with CMake) multiple versions of the same library side-by-side: 1. The library files

[CMake] configuration packages, IMPORTED targets, and global scope

2017-09-06 Thread Robert Dailey
So it took me a while to figure out why find_package() calls I was making (with CONFIG) option were not accessible outside of the directory in which it was invoked. I realized that all targets seem to be global by default except IMPORTED targets (according to add_library() docs). I find this

Re: [CMake] How should config packages handle components?

2017-09-05 Thread Robert Dailey
in the same package) The cmake-packages doc kind of goes over #1, but #2 doesn't seem to have examples. On Fri, Sep 1, 2017 at 1:21 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > First of all, I want to apologize for including the developer list. > Maybe I'm not being pa

Re: [cmake-developers] How should config packages handle components?

2017-09-05 Thread Robert Dailey
in the same package) The cmake-packages doc kind of goes over #1, but #2 doesn't seem to have examples. On Fri, Sep 1, 2017 at 1:21 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > First of all, I want to apologize for including the developer list. > Maybe I'm not being pa

Re: [CMake] Should configuration package files define module package variables?

2017-09-05 Thread Robert Dailey
On Sat, Sep 2, 2017 at 3:08 AM, P F wrote: > In general, if the library does not have any dependencies, you can just > export the targets directly to the config.cmake file: > > install(TARGETS foo EXPORT foo-config) > install(EXPORT foo-config DESTINATION lib/cmake/foo) > >

Re: [cmake-developers] [CMake] Should configuration package files define module package variables?

2017-09-05 Thread Robert Dailey
On Sat, Sep 2, 2017 at 3:08 AM, P F wrote: > In general, if the library does not have any dependencies, you can just > export the targets directly to the config.cmake file: > > install(TARGETS foo EXPORT foo-config) > install(EXPORT foo-config DESTINATION lib/cmake/foo) > >

Re: [CMake] [cmake-developers] How should config packages handle components?

2017-09-01 Thread Robert Dailey
On Fri, Sep 1, 2017 at 1:40 PM, Alex Turbov <i.za...@gmail.com> wrote: > Hi Robert, > > > On Fri, Sep 1, 2017 at 9:21 PM, Robert Dailey <rcdailey.li...@gmail.com> > wrote: >> >> >> One problem I thought of with the former (one big target.cmake with &

Re: [cmake-developers] How should config packages handle components?

2017-09-01 Thread Robert Dailey
On Fri, Sep 1, 2017 at 1:40 PM, Alex Turbov <i.za...@gmail.com> wrote: > Hi Robert, > > > On Fri, Sep 1, 2017 at 9:21 PM, Robert Dailey <rcdailey.li...@gmail.com> > wrote: >> >> >> One problem I thought of with the former (one big target.cmake with &

[cmake-developers] How should config packages handle components?

2017-09-01 Thread Robert Dailey
First of all, I want to apologize for including the developer list. Maybe I'm not being patient enough, but it seems like every post I've made on the normal users list doesn't get any attention. Secondly, the cmake-packages portion of the cmake documentation doesn't go into a ton of detail about

[CMake] How should config packages handle components?

2017-09-01 Thread Robert Dailey
First of all, I want to apologize for including the developer list. Maybe I'm not being patient enough, but it seems like every post I've made on the normal users list doesn't get any attention. Secondly, the cmake-packages portion of the cmake documentation doesn't go into a ton of detail about

[CMake] Proper process for static & shared variants of config packages?

2017-09-01 Thread Robert Dailey
Suppose I have a library target and I setup a config package for it and install target exports for it. What is the process for supporting installation of the shared library and static library variants (maybe the same answer applies to debug and release variants too)? Should you create 1 target

Re: [cmake-developers] [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
. On Tue, Aug 29, 2017 at 12:51 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > On Tue, Aug 29, 2017 at 12:12 PM, Rolf Eike Beer <e...@sf-mail.de> wrote: >> Am Dienstag, 29. August 2017, 11:21:42 schrieb Robert Dailey: >>> Ok I debugged find_path() code in CMak

Re: [cmake-developers] [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
On Tue, Aug 29, 2017 at 12:12 PM, Rolf Eike Beer <e...@sf-mail.de> wrote: > Am Dienstag, 29. August 2017, 11:21:42 schrieb Robert Dailey: >> Ok I debugged find_path() code in CMake and I determined the problem. >> First, let me explain what I'm doing a little more... >

Re: [cmake-developers] [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
Ok I debugged find_path() code in CMake and I determined the problem. First, let me explain what I'm doing a little more... I build third party libraries on demand during configure step in CMake. I do so via execute_process() to invoke another CMake instance, that builds and installs a library.

Re: [CMake] [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
Ok I debugged find_path() code in CMake and I determined the problem. First, let me explain what I'm doing a little more... I build third party libraries on demand during configure step in CMake. I do so via execute_process() to invoke another CMake instance, that builds and installs a library.

Re: [CMake] [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
On Tue, Aug 29, 2017 at 10:54 AM, Brad King <brad.k...@kitware.com> wrote: > On 08/29/2017 11:50 AM, Robert Dailey wrote: >> Wow even if I set ZLIB_ROOT, FindZLIB.cmake *still* won't find my zlib >> over the one provided by the Android NDK... >> >> Although I

Re: [cmake-developers] [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
On Tue, Aug 29, 2017 at 10:54 AM, Brad King <brad.k...@kitware.com> wrote: > On 08/29/2017 11:50 AM, Robert Dailey wrote: >> Wow even if I set ZLIB_ROOT, FindZLIB.cmake *still* won't find my zlib >> over the one provided by the Android NDK... >> >> Although I

Re: [cmake-developers] [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
Wow even if I set ZLIB_ROOT, FindZLIB.cmake *still* won't find my zlib over the one provided by the Android NDK... Although I was able to get this working fine on Windows, it does not work with the NDK's toolchain file. On Tue, Aug 29, 2017 at 10:43 AM, Robert Dailey <rcdailey.li...@gmail.

Re: [CMake] [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
Wow even if I set ZLIB_ROOT, FindZLIB.cmake *still* won't find my zlib over the one provided by the Android NDK... Although I was able to get this working fine on Windows, it does not work with the NDK's toolchain file. On Tue, Aug 29, 2017 at 10:43 AM, Robert Dailey <rcdailey.li...@gmail.

Re: [CMake] [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
ay attention to > CMAKE_PREFIX_PATH. > > It's better to use a config file, but when you have to use a find > module, you have to dig in and figure out the right way to use each > one. > > > > On Tue, Aug 29, 2017 at 11:25 AM, Robert Dailey > <rcdailey.li...@gmail.c

Re: [cmake-developers] [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
ay attention to > CMAKE_PREFIX_PATH. > > It's better to use a config file, but when you have to use a find > module, you have to dig in and figure out the right way to use each > one. > > > > On Tue, Aug 29, 2017 at 11:25 AM, Robert Dailey > <rcdailey.li...@gmail.c

Re: [CMake] [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
29, 2017 at 10:11 AM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > What I'm hoping for is that find_package() follows the rules it > documents here: > https://cmake.org/cmake/help/v3.6/command/find_package.html > > Specifically, it states it searches these paths (and th

Re: [cmake-developers] [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
29, 2017 at 10:11 AM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > What I'm hoping for is that find_package() follows the rules it > documents here: > https://cmake.org/cmake/help/v3.6/command/find_package.html > > Specifically, it states it searches these paths (and th

Re: [cmake-developers] [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
g 29, 2017 at 10:06 AM, David Cole <dlrd...@aol.com> wrote: > Shouldn't the "/zlib" at the end be included in your CMAKE_PREFIX_PATH? > > On Tue, Aug 29, 2017 at 11:01 AM, Robert Dailey > <rcdailey.li...@gmail.com> wrote: >> On Tue, Aug 29, 2017 at 9:56 AM, Bra

Re: [CMake] [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
g 29, 2017 at 10:06 AM, David Cole <dlrd...@aol.com> wrote: > Shouldn't the "/zlib" at the end be included in your CMAKE_PREFIX_PATH? > > On Tue, Aug 29, 2017 at 11:01 AM, Robert Dailey > <rcdailey.li...@gmail.com> wrote: >> On Tue, Aug 29, 2017 at 9:56 AM, Bra

Re: [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
On Tue, Aug 29, 2017 at 9:56 AM, Brad King <brad.k...@kitware.com> wrote: > On 08/29/2017 10:55 AM, Brad King wrote: >> On 08/29/2017 10:48 AM, Robert Dailey wrote: >>> CMAKE_PREFIX_PATH: E:/code/frontend/msvc_2015/third_party/installed >>> CMAKE_FIND_ROOT

Re: [CMake] [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
On Tue, Aug 29, 2017 at 9:56 AM, Brad King <brad.k...@kitware.com> wrote: > On 08/29/2017 10:55 AM, Brad King wrote: >> On 08/29/2017 10:48 AM, Robert Dailey wrote: >>> CMAKE_PREFIX_PATH: E:/code/frontend/msvc_2015/third_party/installed >>> CMAKE_FIND_ROOT

Re: [CMake] [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
.cmake:377 (_FPHSA_FAILURE_MESSAGE) E:/Program Files/CMake/share/cmake-3.9/Modules/FindZLIB.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) Core/ThirdParty/zlib/CMakeLists.txt:6 (find_package) On Tue, Aug 29, 2017 at 9:33 AM, Brad King <brad.k...@kitware.com> wrote: > On 08/29/2017 10:27 AM, Robert D

Re: [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
.cmake:377 (_FPHSA_FAILURE_MESSAGE) E:/Program Files/CMake/share/cmake-3.9/Modules/FindZLIB.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) Core/ThirdParty/zlib/CMakeLists.txt:6 (find_package) On Tue, Aug 29, 2017 at 9:33 AM, Brad King <brad.k...@kitware.com> wrote: > On 08/29/2017 10:27 AM, Robert D

Re: [CMake] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
ROOT_PATH I think?) How can I get the proper install & find_package behavior on Windows based on the requirements above? On Sun, Aug 27, 2017 at 2:55 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > So I'm trying to get CMake to find a package, and it isn't finding it. > I am

Re: [cmake-developers] Debugging find_package() search behavior?

2017-08-29 Thread Robert Dailey
ROOT_PATH I think?) How can I get the proper install & find_package behavior on Windows based on the requirements above? On Sun, Aug 27, 2017 at 2:55 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > So I'm trying to get CMake to find a package, and it isn't finding it. > I am

Re: [CMake] CMake + Gradle for Android

2017-08-27 Thread Robert Dailey
cmake { >> targets "library1", "library2" >> } >> } >> } >> >> That should work for you. Let me know. >> >> On Fri, Aug 25, 2017 at 2:42 PM, Robert Dailey &

[CMake] Debugging find_package() search behavior?

2017-08-27 Thread Robert Dailey
So I'm trying to get CMake to find a package, and it isn't finding it. I am setting CMAKE_PREFIX_PATH to try to get it to find it. Is there a way I can view the search paths & prefixes that CMake is using with each find_package() call? I tried enabling debug and trace output, but neither of these

Re: [CMake] CMake + Gradle for Android

2017-08-25 Thread Robert Dailey
next C++ meeting and > I'll also be checking for myself whether ccache will work in this CMake > scenario. If ccache does work it seems like the natural level at which to > fold identical builds. > > > > On Wed, Aug 23, 2017 at 1:03 PM, Robert Dailey <rcdailey.li...@gmail.com&g

Re: [cmake-developers] Should configuration package files define module package variables?

2017-08-25 Thread Robert Dailey
On Fri, Aug 25, 2017 at 11:21 AM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > So I've been studying the find_package[1] and "creating packages"[2] > documentation, as well as the CMakePackageConfigHelpers[3] page. > > Based on the current offerings of

Re: [CMake] Should configuration package files define module package variables?

2017-08-25 Thread Robert Dailey
On Fri, Aug 25, 2017 at 11:21 AM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > So I've been studying the find_package[1] and "creating packages"[2] > documentation, as well as the CMakePackageConfigHelpers[3] page. > > Based on the current offerings of

[cmake-developers] Should configuration package files define module package variables?

2017-08-25 Thread Robert Dailey
So I've been studying the find_package[1] and "creating packages"[2] documentation, as well as the CMakePackageConfigHelpers[3] page. Based on the current offerings of configuration packages, I do not understand the need for the relocatable config.cmake file when all it really contains is:

[CMake] Should configuration package files define module package variables?

2017-08-25 Thread Robert Dailey
So I've been studying the find_package[1] and "creating packages"[2] documentation, as well as the CMakePackageConfigHelpers[3] page. Based on the current offerings of configuration packages, I do not understand the need for the relocatable config.cmake file when all it really contains is:

[CMake] Best practice for modifying search path for find_package()

2017-08-24 Thread Robert Dailey
So I have a "super build" CMake script that runs a series of ExternalProject_Add() functions to execute builds of various third party libraries and install them to a path relative to the parent project's CMAKE_BINARY_DIR. Once the parent project generation occurs, it is expected to do a series of

Re: [CMake] CMake + Gradle for Android

2017-08-24 Thread Robert Dailey
things better without > violating that tenet but that could be lack of imagination on my part. > > We'll definitely be discussing this use case at our next C++ meeting and > I'll also be checking for myself whether ccache will work in this CMake > scenario. If ccache does work it seems li

Re: [CMake] CMake + Gradle for Android

2017-08-23 Thread Robert Dailey
gs, etc. and that's something we're pretty much > stuck with. > Regarding just the redundant build issue, would something like ccache help? > I know people have used it with ndk-build with success, I'm not sure about > CMake but I don't see why that should make a difference. > > > > On

Re: [CMake] CMake + Gradle for Android

2017-08-22 Thread Robert Dailey
, Aug 22, 2017 at 9:26 AM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > Sorry I forgot to answer your last set of questions: > > CommonLib is indeed 2 things: > > * A common (static or shared) library for native code (most of our > CMake targets specify CommonLib as a link

Re: [CMake] CMake + Gradle for Android

2017-08-22 Thread Robert Dailey
;>> There is a second set of folders that hold the stripped versions of the >>> .so files that is purely managed by the android gradle plugin, so you might >>> consider the answer to be 2 * x * y * z. >>> >>> Hope this helps. >>> >>>

Re: [CMake] CMake + Gradle for Android

2017-08-22 Thread Robert Dailey
To be more accurate, you should consider y and z >>> to be functions of each build.gradle file since these can vary. >>> >>> There is a second set of folders that hold the stripped versions of the >>> .so files that is purely managed by the android gradle plugin, so

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
oes centralize the information. > > > On Mon, Aug 21, 2017 at 11:20 AM, Robert Dailey <rcdailey.li...@gmail.com> > wrote: >> >> I wouldn't want to do that, it's too convoluted. I have other >> platforms that use these CMake scripts as well. For example, I run on &

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
for your situation for the leaf CMakeLists.txt to include the > root CMakeLists.txt? Then have the leaf-specific logic in the leaf > CMakeLists.txt? > > > > On Mon, Aug 21, 2017 at 9:33 AM, Robert Dailey <rcdailey.li...@gmail.com> > wrote: >> >>

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
the APK. Is the > issue that you have multiple APK modules that all reference the same CMake > libraries? > > On Mon, Aug 21, 2017 at 9:00 AM, Robert Dailey <rcdailey.li...@gmail.com> > wrote: >> >> Thanks this is very helpful. The other question I have is: Is there a &g

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
specified in build.gradle using jniDirs > > On Mon, Aug 21, 2017 at 7:30 AM, Robert Dailey <rcdailey.li...@gmail.com> > wrote: >> >> How exactly does Gradle package *.so files in an APK? I know that ANT >> used to do this for any libs under "libs/". Does Gr

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
per ABI) > 3) Not sure I understand this. > > The other document worth taking a look at (if you haven't already) is: > https://developer.android.com/studio/projects/add-native-code.html > > > On Mon, Aug 7, 2017 at 3:35 PM, Robert Dailey <rcdailey.li...@gmail.com> > w

[CMake] RUN_TESTS does not rebuild targets?

2017-08-18 Thread Robert Dailey
Why does the RUN_TESTS target in Visual Studio IDE not first build the unit tests before running them? If my tests are out of date, I expect the executables to be built first and then CTest to be invoked. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

Re: [CMake] CMake + Gradle for Android

2017-08-07 Thread Robert Dailey
rk in > principal. > > I hope this helps, > Jomo > > > On Mon, Aug 7, 2017 at 11:09 AM, Robert Dailey <rcdailey.li...@gmail.com> > wrote: >> >> Right now I have custom targets set to execute the "ant release" >> command after my native t

[CMake] CMake + Gradle for Android

2017-08-07 Thread Robert Dailey
Right now I have custom targets set to execute the "ant release" command after my native targets are built. Part of that command involves copying *.so files to the libs/armeabi-v7a directory so they get packaged in an APK. When switching to gradle, I have two options: 1. Gradle drives CMake:

Re: [CMake] How to do platform specific setup?

2017-07-26 Thread Robert Dailey
t; Note that the idea of a toolchain file is that the file is customized > exactly for your environment. > > Best regards, > Mario > > > [1] https://cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file > > On 2017-07-19 21:22, Robert Dailey wrote: >> So in one

[CMake] Boost is planning to switch from bjam to CMake!

2017-07-23 Thread Robert Dailey
Very exciting news... hopefully it works out! Congratulations to CMake for this; this is huge support for CMake and shows it is becoming way more popular (not that it wasn't already!)

Re: [CMake] file(COPY) is copying even if file hasn't changed

2017-07-20 Thread Robert Dailey
FYI I decided to file an issue for this here: https://gitlab.kitware.com/cmake/cmake/issues/17087 On Wed, Jul 19, 2017 at 4:05 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > Oh also file(INSTALL) does the same thing; the "Installing:" message > gets printed each

Re: [CMake] file(COPY) is copying even if file hasn't changed

2017-07-19 Thread Robert Dailey
Oh also file(INSTALL) does the same thing; the "Installing:" message gets printed each time for the same file, and never says that it is "up to date". On Wed, Jul 19, 2017 at 4:04 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > According to the documentation

[CMake] file(COPY) is copying even if file hasn't changed

2017-07-19 Thread Robert Dailey
According to the documentation for file(COPY) [1]: "Copying preserves input file timestamps, and optimizes out a file if it exists at the destination with the same timestamp" However this is not the case. My host OS is Windows 10 and I'm using CMake 3.9.0-rc5. Each time my CMakeLists.txt is run,

[CMake] How to do platform specific setup?

2017-07-19 Thread Robert Dailey
So in one of my top level CMake scripts, I have this: ``` if( ANDROID ) include( android ) _setup_android_platform() elseif( UNIX ) include( unix ) _setup_unix_platform() endif() if( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) include( clang ) _setup_clang_toolchain()

Re: [CMake] Best way to append "--no-undefined" to shared link flags?

2017-07-18 Thread Robert Dailey
that ships with the NDK according to Dan Albert). Does --no-defined get specified by default for other platforms? Or is it just Android that isn't getting it? On Tue, Jul 18, 2017 at 3:38 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > For only compilers that support it (I guess any

Re: [cmake-developers] Best way to append "--no-undefined" to shared link flags?

2017-07-18 Thread Robert Dailey
that ships with the NDK according to Dan Albert). Does --no-defined get specified by default for other platforms? Or is it just Android that isn't getting it? On Tue, Jul 18, 2017 at 3:38 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote: > For only compilers that support it (I guess any

[CMake] Best way to append "--no-undefined" to shared link flags?

2017-07-18 Thread Robert Dailey
For only compilers that support it (I guess any clang/gcc compiler?), I want my shared libs to link with "--no-undefined". What is the best (most modern) way using CMake 3.9.0 and forward to do this? Is it still to explicitly set CMAKE_SHARED_LINKER_FLAGS? How does this impact using toolchain

Re: [CMake] Transitive behavior of target_link_libraries between shared/static

2017-07-18 Thread Robert Dailey
it would be quicker to ask here to see if anyone knew. On Tue, Jul 18, 2017 at 12:15 PM, Hendrik Sattler <p...@hendrik-sattler.de> wrote: > > > Am 18. Juli 2017 18:02:40 MESZ schrieb Eric Noulard <eric.noul...@gmail.com>: >>2017-07-17 17:31 GMT+02:00 Robert Daile

Re: [CMake] Copying target output file to another directory

2017-07-18 Thread Robert Dailey
tall time, you can look at using > add_custom_command Generating File signature with a target dependency > on ${target} > > On Tue, Jul 18, 2017 at 10:44 AM, Robert Dailey > <rcdailey.li...@gmail.com> wrote: >> So I need to copy the output *.so from a target to an arbitrary

[CMake] Copying target output file to another directory

2017-07-18 Thread Robert Dailey
So I need to copy the output *.so from a target to an arbitrary directory outside the CMAKE_BINARY_DIR. I tried doing this as a post build event using generator expressions: add_custom_command( TARGET ${target} POST_BUILD VERBATIM COMMAND ${CMAKE_COMMAND} -E copy

[CMake] Transitive behavior of target_link_libraries between shared/static

2017-07-17 Thread Robert Dailey
Suppose I have the following: ``` add_library( A STATIC ${files} ) add_library( B SHARED ${more_files} ) target_link_libraries( B PUBLIC A ) add_library( C STATIC ${even_more_files} ) target_link_libraries( C PUBLIC B ) add_executable( D ${exe_files} ) target_link_libraries( D PRIVATE C ) ```

[CMake] Built-in way to detect if a root script is standalone or not?

2017-07-17 Thread Robert Dailey
I have logic similar to this in some of my middleware libraries' root CMakeLists.txt: if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) set( STANDALONE TRUE ) endif() Is there a built-in way to detect this? -- Powered by www.kitware.com Please keep messages on-topic and check the

[CMake] ExternalProject with toolchain files for cross compiling?

2017-07-14 Thread Robert Dailey
So I'd like to use ExternalProject_Add() to pull down an external git repository that builds with CMake. I'd like it to use the same toolchain file that I"m using in my parent projects. However, I do not see any explicit documentation regarding toolchain support for ExternalProject. Do I need to

[cmake-developers] Using USES_TERMINAL in ExternalProject.cmake

2017-07-13 Thread Robert Dailey
In my own personal usage of add_custom_target() and add_custom_command(), I use USES_TERMINAL so that stdout and stderr from commands that are actively running get output in more real-time. I've only tested this using the Ninja generator, and seems to improve output behavior. Without it, I notice

  1   2   3   4   5   6   7   8   9   >