[CMake] How to add project files?

2017-07-13 Thread Florian Lindner
Hello, our project, which is currently using scons is structured like this ROOT - SConstruct - CMakeLists.txt - src/ - SConscript - CMAkeLists.txt - Module1 - somesourcefiles.cpp - tests/ - testsourcefiles.cpp - config/ - configsourcefile.cpp

Re: [CMake] fortran linking issue

2017-07-13 Thread Juan E. Sanchez
It turns out these linker flags were being added by cmake. To disable them, I had to: unset(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES) I was then able to use SET_TARGET_PROPERTIES to link into the static versions of the code I wanted. This also fixed the issue for the case where I had a C++ exe

[CMake] fortran linking issue

2017-07-13 Thread Juan E. Sanchez
When I set the linker language of a fortran program to "C", it automatically links in -lgfortran, -lquadmath, -lm. SET_TARGET_PROPERTIES(main_f PROPERTIES LINKER_LANGUAGE "C") Unfortunately, that precludes me linking in static versions of -lquadmath. How do I tell CMAKE not to append these li

[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

[CMake] Ninja generator and showIncludes

2017-07-13 Thread Ghyslain Leclerc
Hello. I have been searching for a way to prevent the Ninja generator from issuing the showIncludes command to cl. With our update to the latest CMake (3.8.2) on Windows (7 enterprise, at work) with the latest MSVC (2017 community), we now have a ton of messages saying Note: including file:

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-13 Thread Eric Noulard
2017-07-13 13:01 GMT+02:00 René J. V. Bertin : > Eric Noulard wrote: > > > From the command line I doubt it. > > Adding -DCMAKE_POLICY_DEFAULT_CMP0060=NEW on the commandline works. > Good to know. > > But whatever the reason, using PNG::PNG works too. Apparently policy 60 > doesn't > affect the

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-13 Thread René J . V . Bertin
Eric Noulard wrote: > From the command line I doubt it. Adding -DCMAKE_POLICY_DEFAULT_CMP0060=NEW on the commandline works. But whatever the reason, using PNG::PNG works too. Apparently policy 60 doesn't affect the IMPORTED_LOCATION target property... > Did you try to use ninja generator inst

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-13 Thread Eric Noulard
2017-07-13 12:07 GMT+02:00 René J. V. Bertin : [...] > > > > > The thing I don't understand is that you use CMake 3.8.2 so you should > get > > the new behavior. > > Are you sure? I read from the description above that you have to set the > policy > explicitly. > You are right, it depends on the

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-13 Thread René J . V . Bertin
Eric Noulard wrote: > Thanks you for digging this. > I totally ignored that "feature". I guess most of us did, it's one of those things that usually works just fine but that when it breaks sends you on a nasty quest to figure out WTF is going on (IOW, makes you doubt yourself until you realise

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-13 Thread Eric Noulard
2017-07-13 2:04 GMT+02:00 René J. V. Bertin : > Andreas Naumann wrote: > > > cmake instrospects your compiler and asks for system directories. > > Just stumbled across this documentation tidbit: > Thanks you for digging this. I totally ignored that "feature". > > >>> > CMAKE__IMPLICIT_LINK