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 build

[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 `-G"Nin

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 ove

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

2018-08-21 Thread Robert Dailey
mpson, KT wrote: > > I'm also interested 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 > > -Origin

[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: http

[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 buil

Re: [CMake] Performance profiling for CMake scripts?

2018-06-20 Thread Robert Dailey
olicies are 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'

[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 P

[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 CM

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

[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 `target_

[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 ) message

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

2017-10-03 Thread Robert Dailey
ied setting the project call of project(libpng VERSION > 1.6.33 LANGUAGES ASM_MASM C) > > On Tue, Sep 12, 2017 at 2:34 PM, Robert Dailey > wrote: >> Also, I am using the "Visual Studio 15 2017" generator with no other >> options (generating through cmake-gui on Wi

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 wrote: > Using CMake 3.9, I do this: > > cmake_minimum_required(VERSION 3.9) > project(libpng VERSION

[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 CMakeLists.txt:16

[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* versio

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 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 >> making (with CO

[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 ha

[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 counte

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

2017-09-05 Thread Robert Dailey
nents 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 wrote: > First of all, I want to apologize for including the developer list. > Maybe I'm not being patient enough, but it

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) > > However, if the librar

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 wrote: > Hi Robert, > > > On Fri, Sep 1, 2017 at 9:21 PM, Robert Dailey > wrote: >> >> >> One problem I thought of with the former (one big target.cmake with >> all import targets in there) is that if you on

[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 c

[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 and

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. Th

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 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 was able to get this work

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 wrote: > Th

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

2017-08-29 Thread Robert Dailey
pay 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 > wrote: >>

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

2017-08-29 Thread Robert Dailey
, Aug 29, 2017 at 10:11 AM, Robert Dailey 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 that is &

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

2017-08-29 Thread Robert Dailey
Aug 29, 2017 at 10:06 AM, David Cole 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 > wrote: >> On Tue, Aug 29, 2017 at 9:56 AM, Brad King wrote: >>> On 08/29/2017 10:55

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 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_PATH: E:/code/frontend/msvc_2015/thir

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 wrote: > On 08/29/2017 10:27 AM, Robert Dailey wrote: >> I'm rely

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

2017-08-29 Thread Robert Dailey
uld just append to the end of CMAKE_FIND_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 wrote: > So I'm trying to get CMake to find a package, and it isn't findi

Re: [CMake] CMake + Gradle for Android

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

[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 s

Re: [CMake] CMake + Gradle for Android

2017-08-25 Thread Robert Dailey
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 like the natural level at which to > fold identical builds. > > > > On Wed, Aug 23, 2017 at 1:03 PM, Robert Dailey > w

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 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 configuration packages, I do not &g

[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: includ

[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
x27;t see a way we could make 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 t

Re: [CMake] CMake + Gradle for Android

2017-08-23 Thread Robert Dailey
++ flags, 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

Re: [CMake] CMake + Gradle for Android

2017-08-22 Thread Robert Dailey
s. On Tue, Aug 22, 2017 at 9:26 AM, Robert Dailey 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 dependency) > * A c

Re: [CMake] CMake + Gradle for Android

2017-08-22 Thread Robert Dailey
d 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. >>> >>> >>> >>> >>> >>> >>> On Mon

Re: [CMake] CMake + Gradle for Android

2017-08-22 Thread Robert Dailey
o 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
> > ext { > cmakePath = file "CMakeLists.txt" > } > > And then consume them in the leaf app/build.gradle like this? > > externalNativeBuild { > cmake { > path cmakePath > } > } > > It doesn't fully hide the details but it doe

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
t work 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 > wrote: >> >> Basically, yes. We ha

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
of 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 > wrote: >> >> Thanks this is very helpful. The other question I have is: Is there a >> place to centrally s

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
sing jniDirs > > On Mon, Aug 21, 2017 at 7:30 AM, Robert Dailey > 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 Gradle do some >> introspection into CMake targets to s

Re: [CMake] CMake + Gradle for Android

2017-08-21 Thread Robert Dailey
; 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 > wrote: >> >> Thanks Jom >&g

[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: ht

Re: [CMake] CMake + Gradle for Android

2017-08-07 Thread Robert Dailey
projects that use this approach but it should work in > principal. > > I hope this helps, > Jomo > > > On Mon, Aug 7, 2017 at 11:09 AM, Robert Dailey > wrote: >> >> Right now I have custom targets set to execute the "ant release" >> command after m

[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: This

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

2017-07-26 Thread Robert Dailey
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 of my top level CMake

[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!) https://lists.boost.org/boost-interest/2017/07/0162.php?utm_content=buffera6a82&utm_medium=social&utm_source=plus.

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 wrote: > Oh also file(INSTALL) does the same thing; the "Installing:" message > gets printed each time for the same file, and never

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 wrote: > According to the documentation for file(COPY) [1]: "Co

[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, t

[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() elseif(

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 wrote: > For only compilers that support it (I guess any clang/gcc compiler?), >

[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 files

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

2017-07-18 Thread Robert Dailey
or, but i thought it would be quicker to ask here to see if anyone knew. On Tue, Jul 18, 2017 at 12:15 PM, Hendrik Sattler wrote: > > > Am 18. Juli 2017 18:02:40 MESZ schrieb Eric Noulard : >>2017-07-17 17:31 GMT+02:00 Robert Dailey : >> >>> Suppose I have the follow

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

2017-07-18 Thread Robert Dailey
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 > wrote: >> So I need to copy the output *.so from a target to an arbitrary >> directory outside the CMAKE_BINARY_DIR.

[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 "$" ${dir} ) This fails b

[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 CM

[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 ex

[CMake] GetPrerequisites with Android?

2017-07-13 Thread Robert Dailey
Has anyone used GetPrerequisites[1] when cross-compiling a shared library with Android NDK toolchain? I'd like some way to get dependent *.so files (located in the NDK itself and specified on the linker command line when building) so I can copy them to my android java project dir under "libs" so th

Re: [CMake] FindDoxygen is doing find_package() when it is included

2017-07-07 Thread Robert Dailey
provides. I'm guessing this is supported behavior. If so, I'll rely on it. On Fri, Jul 7, 2017 at 1:20 PM, Robert Dailey wrote: > I actually confused myself a bit... I think the issue is not that > finding happens when including it, but that doxygen_add_docs() is > bundled w

Re: [CMake] FindDoxygen is doing find_package() when it is included

2017-07-07 Thread Robert Dailey
include FindDoxygen to get access to the function? On Fri, Jul 7, 2017 at 1:13 PM, Robert Dailey wrote: > When I do this: > > > message( "blah1" ) > include( FindDoxygen ) > > message( "blah2" ) > find_package( Doxygen 1.8.6 OPTIONAL_COMPONENTS dot )

[CMake] FindDoxygen is doing find_package() when it is included

2017-07-07 Thread Robert Dailey
When I do this: message( "blah1" ) include( FindDoxygen ) message( "blah2" ) find_package( Doxygen 1.8.6 OPTIONAL_COMPONENTS dot ) message( "blah3" ) I get this output: blah1 -- Found Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (found version "1.8.13") found components: doxygen missin

[CMake] How to refer to *.so files in Android NDK?

2017-06-22 Thread Robert Dailey
In my toolchain file for Android NDK, I specify the following *.so paths manually: set( ANDROID_PREBUILT_LIBRARIES ${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_shared.so ${CMAKE_ANDROID_NDK}/platforms/android-15/arch-x86/usr/lib/libz.so ) However, I'd like a

[CMake] Reentrant-safe includes

2017-06-09 Thread Robert Dailey
So I have a series of common CMake scripts I use: pre-setup.cmake post-setup.cmake I include pre-setup.cmake at the beginning of the root CMakeLists.txt and post-setup.cmake is included at the bottom. add_subdirectory() and other target stuff is done inbetween. One issue I run into is that these

Re: [CMake] Force target to always run last?

2017-05-18 Thread Robert Dailey
individualTarget. > > Maybe I just don't understand fully, but why would you ever "make > individualTarget" and then expect package to work properly? What if > stuff that depends on that individualTarget also needs to rebuild > before packaging? Shouldn't you ha

Re: [CMake] Force target to always run last?

2017-05-18 Thread Robert Dailey
> or not. > > Sorry. > > Why does this need to run after the build of any individual target? > Why not just say there are two ways to get it to run: build "all" or > explicitly build it after you build the other individual thing you > want? > > > > >

Re: [CMake] Force target to always run last?

2017-05-18 Thread Robert Dailey
other targets. (Or at least all other "leaf" targets, > which further depend on others, ... the sum of which is "all other > targets" besides the new "last" target.) > > So it's not pretty, but it's possible. > > > HTH, > David C. &

[CMake] Force target to always run last?

2017-05-17 Thread Robert Dailey
I have a custom target that must meet the following requirements: * It must always run, regardless of what subset of other targets are being built * It must always be the very last thing run. In parallelized builds, it must wait until all other targets are done building before starting, so that it

Re: [CMake] How to get list of target dependencies?

2017-05-04 Thread Robert Dailey
Forgot to mention, I'm using CMake 3.8.1 On Thu, May 4, 2017 at 10:47 AM, Robert Dailey wrote: > How can I get a list of target dependencies of a target? For example, > if I have 3 library targets that depend on each other like this: > > A -> B -> C > > When I ask fo

[CMake] How to get list of target dependencies?

2017-05-04 Thread Robert Dailey
How can I get a list of target dependencies of a target? For example, if I have 3 library targets that depend on each other like this: A -> B -> C When I ask for the target dependencies for A, I should get a list back with B in it. Basically this would be the same list I pass to target_link_libra

[CMake] What is ANDROID_JAVA_SOURCE_DIR for?

2017-05-04 Thread Robert Dailey
I am seeing hints of ANT / JAVA support for Android in 3.8.1 documentation. Essentially there is a whole list of properties that have unexplained use cases under Properties for Targets. I see ANDROID_JAVA_SOURCE_DIR, for example. What are these for? Will CMake actually do the "ant release" command

Re: [CMake] Trouble with FindPNG module

2017-04-24 Thread Robert Dailey
2-bit libraries now, so I am happy. Should CMAKE_SYSTEM_PROCESSOR be i386 or i686? On Mon, Apr 24, 2017 at 12:22 PM, Robert Dailey wrote: > The output is: > > x86_64-linux-gnu > > How can I tell CMake to look for 32-bit libraries? I would like to > force this from my toolchain fil

Re: [CMake] Trouble with FindPNG module

2017-04-24 Thread Robert Dailey
he value of > CMAKE__LIBRARY_ARCHITECTURE? > > > Since you're on a 64-bit system, I'd expect CMake to be looking for 64-bit > libraries unless you've told it otherwise. > > ________ > From: CMake on behalf of Robert Dailey > &g

Re: [CMake] [cmake-developers] Trouble with FindPNG module

2017-04-24 Thread Robert Dailey
On Mon, Apr 24, 2017 at 10:02 AM, Ben Boeckel wrote: > On Mon, Apr 24, 2017 at 09:54:18 -0500, Robert Dailey wrote: >> On Fri, Apr 21, 2017 at 4:48 PM, Robert Dailey >> wrote: >> > I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following: >> > >>

Re: [CMake] Trouble with FindPNG module

2017-04-24 Thread Robert Dailey
Sorry to bump; any info on this? I'm completely blocked :-( On Fri, Apr 21, 2017 at 4:48 PM, Robert Dailey wrote: > I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following: > > find_package(PNG REQUIRED) > > Which gives me the output in CMake: > > Could NOT

[CMake] Trouble with FindPNG module

2017-04-21 Thread Robert Dailey
I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following: find_package(PNG REQUIRED) Which gives me the output in CMake: Could NOT find PNG (missing: PNG_LIBRARY) (found version "1.2.50") The CMakeCache.txt file has these variables set: PNG_LIBRARY_DEBUG:FILEPATH=PNG_LIBRARY_DEBUG-NOTFOUND

Re: [CMake] Need code review of my android toolchain file

2017-04-21 Thread Robert Dailey
build absolute paths to items in the NDK. On Tue, Apr 18, 2017 at 9:45 PM, Robert Dailey wrote: > I'm trying to follow best practices where I can, but the trouble is > I'm not aware of any. So I want to post my android.toolchain.cmake > file here, with the hope that I can get som

[CMake] Need code review of my android toolchain file

2017-04-18 Thread Robert Dailey
I'm trying to follow best practices where I can, but the trouble is I'm not aware of any. So I want to post my android.toolchain.cmake file here, with the hope that I can get some pointers. The main thing I want to understand is when it is appropriate to require cache variables be set via command

[CMake] How to get message() to go to stdout when executed from -P?

2017-04-10 Thread Robert Dailey
When I execute a CMake script as a custom command, message() logs are not shown in stdout from that script. Is there a way to make it pipe out messages? -- 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] How to properly handle build version number in CMake script for project

2017-04-10 Thread Robert Dailey
unset( BUILD_VERSION CACHE ) else() set( BUILD_VERSION 7.1.1.2 ) endif() On Mon, Apr 10, 2017 at 1:32 PM, Robert Dailey wrote: > Actually this seems to work: > > if( BUILD_VERSION ) > > set( version_override ${BUILD_VERSION} ) > unset( BUILD_VERSION CACHE ) &

Re: [CMake] How to properly handle build version number in CMake script for project

2017-04-10 Thread Robert Dailey
done, and doesn't require configure_file(). Maybe there is a way to clean this up even more? I noticed that unset( BUILD_VERSION CACHE ) actually unsets non-cache versions of a variable too, so I had to use the temporary variable to transfer the value. On Mon, Apr 10, 2017 at 1:15 PM, Robert Dai

Re: [CMake] How to properly handle build version number in CMake script for project

2017-04-10 Thread Robert Dailey
t 12:48 PM, Bruce Stephens wrote: > On Mon, Apr 10, 2017 at 5:04 PM, Robert Dailey > wrote: >> Actually I think your idea does work. Why do you think it won't? I'm >> using it right now and so far it seems OK. > > I assumed (without testing, admittedly) is that i

Re: [CMake] How to properly handle build version number in CMake script for project

2017-04-10 Thread Robert Dailey
Actually I think your idea does work. Why do you think it won't? I'm using it right now and so far it seems OK. 1. On build server, if it overrides it with -D, then it does not set it by hand. If it doesn't override, it will use the fixed version in the file 2. On work machines, it's never defined

[CMake] How to properly handle build version number in CMake script for project

2017-04-10 Thread Robert Dailey
I have a file called version.cmake that my root CMakeLists.txt includes. There is only a single line in this file: set( BUILD_VERSION 1.2.3.4 CACHE STRING "Version of the product" ) I have two scenarios where this version number setting needs to work slightly differently from a CMake perspective:

Re: [CMake] custom command comments not showing up

2017-04-10 Thread Robert Dailey
POST_BUILD >>COMMAND ${CMAKE_COMMAND} -E echo "test2" >>COMMAND ${CMAKE_COMMAND} ARGS ...snip... >>) >> >> >> >>On Fri, Apr 7, 2017 at 11:40 PM, Robert Dailey >> >>wrote: >> >>> So I probably am not understand

[CMake] custom command comments not showing up

2017-04-07 Thread Robert Dailey
So I probably am not understanding how this works. I have a custom target, that I later add multiple custom commands to. Each custom command has a COMMENT set, but the target itself does too: add_custom_target(zApp_zip COMMENT "test1") add_custom_command( TARGET zApp_zip POST_BUILD

[CMake] Need advice on dual-build APK setup in CMake

2017-04-06 Thread Robert Dailey
I have CMake setup to build native shared libraries (*.so) that are included in an APK built for Android. The "ant release" command is invoked by a custom target I define in CMake, which handles building the java pieces as well as packaging the final app into an APK file. So the build pipeline whe

Re: [CMake] Building third party libraries along with normal targets

2017-03-30 Thread Robert Dailey
On Thu, Mar 30, 2017 at 3:42 AM, Tamás Kenéz wrote: > An alternative to the CMake superbuild: leave your actual project intact. > Simply create a separate shell script which builds all the dependencies (by > running cmake commands). Or, if you do like the ExternalProject stuff, > create a superbui

Re: [CMake] Building third party libraries along with normal targets

2017-03-29 Thread Robert Dailey
On Wed, Mar 29, 2017 at 9:32 PM, Florent Castelli wrote: > On 30/03/2017 03:54, Robert Dailey wrote: >> >> On Wed, Mar 29, 2017 at 8:18 PM, Florent Castelli >> wrote: >>> >>> This is known as "super build". >>> Yes, this is exactly

Re: [CMake] Building third party libraries along with normal targets

2017-03-29 Thread Robert Dailey
On Wed, Mar 29, 2017 at 8:18 PM, Florent Castelli wrote: > This is known as "super build". > Yes, this is exactly why I made my Boost CMake build scripts, which you use > unless you changed your mind today :) You mean this? https://github.com/Orphis/boost-cmake It's on the drawing board, for sur

[CMake] include() doesn't work with relative paths?

2017-03-29 Thread Robert Dailey
This fails: include( foo/bar/myscript.cmake ) But this works: include( ${CMAKE_CURRENT_LIST_DIR}/foo/bar/myscript.cmake ) Why are relative paths not working? -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware

[CMake] Building third party libraries along with normal targets

2017-03-29 Thread Robert Dailey
Interested in hearing everyone's thoughts on this idea of mine. Right now I have several third party libraries: openssl, boost, libpng, zlib, etc. List goes on. I need to support these libraries on at least 3 different platforms: ARM android, x86 linux, x86 windows. It's a real pain in the rear to

  1   2   3   4   5   6   7   8   9   >