[CMake] Building a repo with multiple applications and install process

2019-02-05 Thread David Jobet
Hello, at work, we have a mono-repo with multiple applications/libs (dozens). The build phase is ok, but I'm not sure about the release process. When we release, we release one application at a time. (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY is true) In order to speed up releases, we always perform an i

[CMake] manipulating tests that are defined in a subdir

2019-02-05 Thread Paul Seyfert
Dear all, (essentially asking what I already posted on SO https://stackoverflow.com/questions/54447765) I have a my_project/CMakeLists.txt file under my control. In its directory there is also a git submodule (say 'my_project/sub' for now), and I add the git-submodule on the cmake level though add

Re: [CMake] --warn-uninitialized works in only first configuration

2019-02-05 Thread Ramold, Felix
It is not a cache variable. Here is an example: cmake_minimum_required(VERSION 3.10) project(TEST_UNINITIALIZED) file(WRITE dummy.cpp "") add_library(dummy dummy.cpp ${UNINITIALIZED}) Also UNINITIALIZED is not added to CMakeCache.txt. Calling cmake twice (even without a change to the list) also

Re: [CMake] --warn-uninitialized works in only first configuration

2019-02-05 Thread Robert Maynard via CMake
Okay now I understand. Yes this is the intended behavior of `--warn-uninitialized`. It is designed so that it will only generate warnings for the explicit invocation of cmake that includes the flag. Subsequent calls to `cmake` without `--warn-uninitialized` will generate no warnings. On Tue, Feb

Re: [CMake] --warn-uninitialized works in only first configuration

2019-02-05 Thread frodak17
When you run `cmake --build Build` it doesn't run cmake with the --warn-uninitialized if the build files need to be regenerated. Therefore you don't get the warnings. On Tue, Feb 5, 2019 at 12:15 PM Ramold, Felix wrote: > It is not a cache variable. Here is an example: > > cmake_minimum_require

[CMake] Linking to boost on OS X 10.12

2019-02-05 Thread Stephens, J. Adam via CMake
Hello, The project I work on links to several shared boost libraries. After our organization disallowed use of OS X 10.11 and we upgraded our built/test slave to 10.12, we encountered a problem with our testing. Executables in the build tree that were built as part of our project now fail to ru

Re: [CMake] patches for MirOS

2019-02-05 Thread Robert Maynard via CMake
As a general policy CMake doesn't offer patch releases of older versions, and instead recommends updating to the latest CMake version. On Sun, Feb 3, 2019 at 10:21 PM Andrew Pennebaker wrote: > > Hiya! > > I got cmake to build in MirOS (also known as MirBSD) v10 this weekend, > painting over ga

Re: [CMake] Linking to boost on OS X 10.12

2019-02-05 Thread Robert Maynard via CMake
My general approach for the second problem is to run a tool such as install_name_tool to change the library names to have @rpath when constructing the package. On Tue, Feb 5, 2019 at 2:25 PM Stephens, J. Adam via CMake wrote: > > Hello, > > > > The project I work on links to several shared boost

Re: [CMake] [EXTERNAL] Re: Linking to boost on OS X 10.12

2019-02-05 Thread Stephens, J. Adam via CMake
Hi Robert, Thanks for your reply. We do use install_name_tool and the like when installing/packaging, and our packages continue to work fine on OS X 10.12. My question is about what to do with executables before packaging, while they are still just in the build tree. We need them to work for pu

Re: [CMake] [EXTERNAL] Re: Linking to boost on OS X 10.12

2019-02-05 Thread Robert Maynard via CMake
The version of the libraries that you load from your build directory would need to be fixed up to. On Tue, Feb 5, 2019 at 5:00 PM Stephens, J. Adam wrote: > > Hi Robert, > > Thanks for your reply. We do use install_name_tool and the like when > installing/packaging, and our packages continue to

Re: [CMake] [SPAM] Re: resource installation

2019-02-05 Thread Robert Maynard via CMake
If you add 'OUTPUT_VARIABLE' and 'ERROR_VARIABLE' information to the execute_process call you should be able to dump the information using 'message' and see if the execute_process is running. On Tue, Jan 29, 2019 at 3:04 PM Rob Boehne wrote: > > I’m still not getting this script executed. I can

Re: [CMake] cmake with vscode

2019-02-05 Thread Robert Maynard via CMake
CMAKE_FIND_ROOT_PATH isn't meant to be used like that, you should use CMAKE_PREFIX_PATH I expect. ROOT_PATH represents the root of a new file-system/OS basically and is meant for cross-compilation. While what you want is extra directories to start searching from which is what CMAKE_PREFIX_PATH is

Re: [CMake] [EXTERNAL] Re: Linking to boost on OS X 10.12

2019-02-05 Thread Craig Scott
I don't know if it is an option in your case, but you could build boost yourself as static libraries. Then the whole build/install rpath situation goes away. In case it is helpful, I recently gave an example of how I'm currently doing this with a FetchContent-based solution. It won't suit everyone,

Re: [CMake] [EXTERNAL] Re: Linking to boost on OS X 10.12

2019-02-05 Thread Juan Sanchez
Hello, Are you able to use BUILD_WITH_INSTALL_RPATH: https://cmake.org/cmake/help/v3.13/prop_tgt/BUILD_WITH_INSTALL_RPATH.html https://cmake.org/cmake/help/v3.13/prop_tgt/INSTALL_RPATH.html#prop_tgt:INSTALL_RPATH Regards, Juan On Tue, Feb 5, 2019 at 4:00 PM Stephens, J. Adam via CMake wrote:

[CMake] Can't open module file *.mod

2019-02-05 Thread Guido Giuntoli
Hi I have a Fortran project with the following order src/module_1.f90 (Fortran Modules) src/module_2.f90 src/... (more files) file(GLOB SOURCES src/*.f90) add_executable(MyExec SOURCES) module_1 depends on module_2 and when is compiling module_1.f90 I get the dependency error : Fatal Error:

Re: [CMake] Can't open module file *.mod

2019-02-05 Thread Petr Penzin
When I ran into the same issue, my workaround was to use file properties to set dependencies between files, but I don't think it is very robust solution. Would be curious to hear if there is a better way to do it. Best, Petr On 2/5/19 2:55 PM, Guido Giuntoli wrote: Hi I have a Fortran proje

Re: [CMake] Can't open module file *.mod

2019-02-05 Thread Juan E. Sanchez
It has been several months since I looked at this. I seem to remember setting dependencies between libraries containing modules, using something like target_link_libraries. I think that cmake was capable of detecting dependencies between files in the same library. I think it relied on the us