[CMake] Adding ignored tests to CTest XML output

2018-03-22 Thread Kai Wolf
Hi all, when adding some ignored tests into the CTestCustom.cmake file via the variable CTEST_CUSTOM_TESTS_IGNORE, I'd expect that those ignored tests will also be written into the XML output file generated by CTest, so that Jenkins or Teamcity is able to visualize this information. However, it s

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread CHEVRIER, Marc
Another possibility is to customize the variable CMAKE_FIND_LIBRARY_SUFFIXES. For example, on linux: * shared only: set (CMAKE_FIND_LIBRARY_SUFFIXES ".so") * static only: set (CMAKE_FIND_LIBRARY_SUFFIXES ".a") On Windows, it is more problematic because static and "import" shared libraries have sa

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread Mario Emmenlauer
Dear Marc, this is a pretty neat idea! Let me quickly recapitulate: the library prefixes and suffixes for multiple platforms are: | static| shared | prefix|suffix| prefix| suffix

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread CHEVRIER, Marc
Yes. Seems OK. For Windows, if libraries are all your owns, you can manage this by relaying on a specific prefix for static libraries. A commonly adopted naming is to add prefix "lib" for static libraries. Now, if you add to rely on external libraries, I don't see any general solution. On 22/03

Re: [CMake] should zlib be searched in CMAKE_PREFIX_PATH or am I confused?

2018-03-22 Thread Mario Emmenlauer
Dear Stephen, thanks for your great help, I certainly learned something! But for my current problem, zlib generally uses autotools to build, and the find_package(ZLIB) is in my case looking for the library, not the cmake config. Would your idea of CMAKE_MODULE_PATH apply to that? All the best,

Re: [CMake] [proposal] Support for modern CMake

2018-03-22 Thread Mateusz Loskot
On 20 March 2018 at 21:52, Alexander Neundorf wrote: > On 2018 M03 20, Tue 21:14:30 CET Mateusz Loskot wrote: > ... >> Why I can not write: >> >> target_use(app Boost::system Boost::filesystem) >> >> or >> >> target_use_targets(app Boost::system Boost::filesystem) >> >> and, actually read and unde

Re: [CMake] [proposal] Support for modern CMake

2018-03-22 Thread Brad King
On 03/22/2018 10:17 AM, Mateusz Loskot wrote: > It seems folks generally agree there is need for porcelain API. > It's a pity it's been 5+ years and it is still waiting for implementation. For reference, there were several discussions. Some of them were here: * "Setting include directories via t

Re: [CMake] [proposal] Support for modern CMake

2018-03-22 Thread Mateusz Loskot
On 22 March 2018 at 16:51, Brad King wrote: > On 03/22/2018 10:17 AM, Mateusz Loskot wrote: >> It seems folks generally agree there is need for porcelain API. >> It's a pity it's been 5+ years and it is still waiting for implementation. > > [...] > The main driving factor was compatibility with ex

Re: [CMake] should zlib be searched in CMAKE_PREFIX_PATH or am I confused?

2018-03-22 Thread Stephen McDowell
Hi Mario, Very sorry, I should have looked more closely! CMAKE_MODULE_PATH is for libraries that install their own CMake scripts. You are correct, Zlib only installs a pkg-config script. However, FindZLIB.cmake doesn’t appear to use that at all (aka I don’t believe you need to be setting PKG

Re: [CMake] should zlib be searched in CMAKE_PREFIX_PATH or am I confused?

2018-03-22 Thread Mario Emmenlauer
Dear Stephen, thanks a lot for your support! I've tested and your suggestion works! But, it does not fully resolve my pain :-( I'm slightly scared now because I assumed that cmake would prefer CMAKE_PREFIX_PATH over system libraries. In my understanding, the documentation says CMAKE_PREFIX_PATH

Re: [CMake] should zlib be searched in CMAKE_PREFIX_PATH or am I confused?

2018-03-22 Thread Stephen McDowell
That’s progress though? :) Hmmm. I understand your problem now, but I don’t know how to fix it. You can do things like find_package(ZLIB NO_DEFAULT_PATH) That makes it so the system Zlib won’t be found, but I couldn’t then get `cmake .. -DZLIB_ROOT=xxx` to work :/ There are other NO_* va

Re: [CMake] Adding ignored tests to CTest XML output

2018-03-22 Thread Zack Galbreath
On Thu, Mar 22, 2018 at 4:08 AM, Kai Wolf wrote: > when adding some ignored tests into the CTestCustom.cmake file via the > variable CTEST_CUSTOM_TESTS_IGNORE, I'd expect that those ignored tests > will also be written into the XML output file generated by CTest, so that > Jenkins or Teamcity is

Re: [CMake] Custom Configurations and CMAKE__FLAGS__INIT

2018-03-22 Thread Marek Vojtko (Firaxis)
It turns out, as of CMake 3.11, this works. Thanks to Beren Minor's commit 48f7e2d3, CMake 3.11 has a new CMakeInitializeConfigs.cmake module that handles all _INIT variables, even custom configuration ones, correctly. Yay! [0] https://gitlab.kitware.com/cmake/cmake/commit/48f7e2d3dc57c31

Re: [CMake] should zlib be searched in CMAKE_PREFIX_PATH or am I confused?

2018-03-22 Thread P F via CMake
Are you setting `CMAKE_INSTALL_PREFIX`? This path is searched before the `CMAKE_PREFIX_PATH` is searched. Also the find_package paths listed in the documentation are only for libraries that provide find_package support. Zlib does not, so it cmake fallsback on the FindZLIB.cmake module to do th

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread P F via CMake
Why not install shared libraries in one location and static libraries in another? > On Mar 21, 2018, at 4:55 AM, Mario Emmenlauer wrote: > > > I've googled this issue for a while now but found only few > references (1,2) and no solution. I'd like to enforce that > find_package() will only acce

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread Ray Donnelly
Our why doesn't cmake set a long needed standard here of .dll.lib and be done with this nonsense? On Thu, Mar 22, 2018, 11:58 PM P F via CMake wrote: > Why not install shared libraries in one location and static libraries in > another? > > > On Mar 21, 2018, at 4:55 AM, Mario Emmenlauer > wrote