[CMake] Cannot build sub-directory library if top-level CMakeLists.txt call install(EXPORT ...)

2018-03-12 Thread Ziji Hu
Hi all, I'm a newbie of CMake. I'm trying to add a feature as a sub-library to an existing application. But I met troubles of install(EXPORT ...) My project source code structure shows as below: app (the existing application) |-- top-level CMakeLists.txt | |-- sublib (my new featur

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

2018-03-12 Thread Ben Boeckel
On Mon, Mar 12, 2018 at 15:11:28 -0500, Robert Dailey wrote: > 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 kno

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 Da

[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] Cmake Frameworks and Bitcode

2018-03-12 Thread Cameron Palmer
So after a bit of hacking it seems that Cmake should provide something like: CMAKE_OSX_BITCODE_ENABLE Which would pass -fembed-bitcode to the compiler and linker and remove the option in Darwin.cmake for -Wl,-headerpad_max_install_names in CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS. Does this sound l

[CMake] Bitcode and CMake

2018-03-12 Thread Cameron Palmer
I’m building frameworks for iOS/tvOS with bitcode at the command-line. In order to compile and link I need to add two things: target_compile_options( library PUBLIC -fembed-bitcode ) target_link_libraries( library PUBLIC -fembed-bitcode ) This works, but yields the complaint that: ld: warning:

Re: [CMake] cmake thinks mingw-64 gfortran on Windows is broken

2018-03-12 Thread Brad King
On 03/09/2018 07:58 PM, Ondřej Čertík wrote: > How do I make CMake pass the "Check for working Fortran compiler" phase? The problem reported in issue 17810 is caused by trying to enable C with MSVC and Fortran with GNU together at the same time, e.g. `project(MyProj C Fortran)`. These tools canno

Re: [CMake] FindMPI & policy CMP0004

2018-03-12 Thread Andreas Naumann
Thank you for the hint, and I run in a similiar problem. Building from scratch solved the issue. Sorry for the noise. Am 11.03.2018 um 23:07 schrieb Craig Scott: This could be a case of needing to clear out an old CMake cache. That problem you mentioned was supposed to have been fixed already.