[cmake-developers] Fwd: [CMake] check_cxx_compiler_flag usage

2017-12-08 Thread Clément Gregoire
ut I think that they should use > check_cxx_source_compiles. > In your case I would use CMAKE_REQUIRED_FLAGS and > check_cxx_source_compiles. > > But as I am not the developer which has written this cmake code there may > be some points that invalidate what I just said. > > Regards, > >

Re: [CMake] check_cxx_compiler_flag usage

2017-12-08 Thread Clément Gregoire
egards, > > Damien R. > > > On 7 December 2017 at 15:13, Clément Gregoire <lec...@gmail.com> wrote: > >> Your usage of check_cxx_compiler_flag is correct, it's probably just >> missing link flags or something. >> Can you check the error log of cmake to know why

Re: [CMake] check_cxx_compiler_flag usage

2017-12-07 Thread Clément Gregoire
Your usage of check_cxx_compiler_flag is correct, it's probably just missing link flags or something. Can you check the error log of cmake to know why it fails to compile ? It is in your buildfolder : CMakeFiles/CMakeError.log Here's how I did it for coverage by the way (not perfect, but was

Re: [CMake] check_cxx_compiler_flag usage

2017-12-07 Thread Clément Gregoire
type is indeed the best solution (though it forces it on all the targets), it's also what I use for my coverage builds. Le jeu. 7 déc. 2017 à 10:38, Eric Noulard <eric.noul...@gmail.com> a écrit : > 2017-12-07 9:35 GMT+01:00 Clément Gregoire <lec...@gmail.com>: > >>

Re: [CMake] check_cxx_compiler_flag usage

2017-12-07 Thread Clément Gregoire
That's probably an issue with linking because it doesn't know it has to link asan. Either way, settings asan flags is the job of the user, not the cmakelists.txt. Such things should be kept in tool chain or config files IMHO. You can try running cmake in verbose mode for more information. Le jeu.

Re: [CMake] Cannot seem to add include directory

2017-11-22 Thread Clément Gregoire
Well, that's the standard way to add include for msbuild projects, other variables are meant to be used for the tool chain includes only Le mer. 22 nov. 2017 à 20:04, Michael Powell a écrit : > On Wed, Nov 22, 2017 at 1:45 PM, Michael Powell >

Re: [cmake-developers] Make it easier for beginners

2017-11-13 Thread Clément Gregoire
Sorry, while I am motivated I had quite a busy month and let this thread quietly slumber, which was not my intent. I was hoping for a concrete answer to my questions but I suppose it requires some sort of merge request (for the documentation/tutorials part), as it would be more effective to get

Re: [CMake] Interface Libraries allow include directories but not link directories.. Why?

2017-08-23 Thread Clément Gregoire
problem, I documented most of my findings in this small template /reference https://github.com/Lectem/cpp-boilerplate (which might still do things the wrong way) Le mer. 23 août 2017 à 02:14, Brian Davis <bitmi...@gmail.com> a écrit : > On Tue, Aug 22, 2017 at 12:42 PM, Clément Greg

Re: [CMake] Interface Libraries allow include directories but not link directories.. Why?

2017-08-22 Thread Clément Gregoire
No you're not meant to specify paths yourself, you should just use find_library. Check how modules such as FindTIFF.cmake are implemented. Le mar. 22 août 2017 à 19:05, Brian Davis a écrit : > > and provide future > > ​target_link_directories( >targ >INTERFACE >

Re: [CMake] cmake-gui on windows and qt5 dlls

2017-08-17 Thread Clément Gregoire
t do the trick ? Just a > cmake-gui.bat that calls cmake-gui.exe should work. > > > > *De : *Robert Maynard <robert.mayn...@kitware.com> > *Envoyé le :*lundi 14 août 2017 15:24 > *À : *Craig Scott <craig.sc...@crascit.com> > *Cc : *Clément Gregoire <lec...@gmail.com

Re: [CMake] cmake-gui on windows and qt5 dlls

2017-08-14 Thread Clément Gregoire
Wouldn't it be possible to move it to a subfolder with the DLLs and put a link next to cmake and ccmake? Executables look for DLLs in their directory and it wouldn't pollute the PATH I personally like to be able to launch it through the command line, it is faster than looking for it and then

Re: [CMake] DLL handling under CMake

2017-08-12 Thread Clément Gregoire
quot; "${TO_FIXUP_LIBS}" > "${TO_FIXUP_DIRS}") > > # End of script ran by the add_custom_command > > else() > > > > set(THIS_FILE ${CMAKE_CURRENT_LIST_FILE}) > > message(${THIS_FILE}) > > function(run_fixup _target _libs _dirs) > > message(${THIS_FILE

Re: [CMake] INTERPROCEDURAL_OPTIMIZATION still not using CMAKE__COMPILER_AR

2017-08-12 Thread Clément Gregoire
Should I file a bug report for this? Le mar. 1 août 2017 à 22:52, Brad King a écrit : > On 07/22/2017 07:33 AM, lec...@gmail.com wrote: > > So I downloaded the 3.9 release and thought my LTO nightmares we over but > > cmake still isn't using CMAKE__COMPILER_AR when

Re: [CMake] Coverage support

2017-08-07 Thread Clément Gregoire
Cmakelists.txt (ie a toolchain file). Le lun. 7 août 2017 à 17:22, Konstantin Tokarev <annu...@yandex.ru> a écrit : > > > 07.08.2017, 17:24, "Clément Gregoire" <lec...@gmail.com>: > >> I usually stop reading Cmakelists.txt as soon as I see this > >> &

Re: [CMake] Coverage support

2017-08-07 Thread Clément Gregoire
sts complex) add_test(NAME example_test COMMAND tests) # CMakelists.txt setup_target_for_coverage(${PROJECT_NAME}_coverage tests coverage) >From this I deduce that you need to call setup_target_for_coverage for each different test executable. 2017-08-07 13:37 GMT+02:00 Rolf Eike

Re: [CMake] Coverage support

2017-08-07 Thread Clément Gregoire
ale on big projects Le lun. 7 août 2017 à 12:50, Rolf Eike Beer <e...@sf-mail.de> a écrit : > Am 2017-08-07 09:57, schrieb Clément Gregoire: > > Hi, > > I'm a bit stuck when trying to add coverage reports to Cmake (gcov + > > lcov) > > as I can't figure out what is th

[CMake] Coverage support

2017-08-07 Thread Clément Gregoire
Hi, I'm a bit stuck when trying to add coverage reports to Cmake (gcov + lcov) as I can't figure out what is the best (idiomatic) way to do it. So far here are the ways I know of : - setting the CMAKE_LANG_FLAGS based on a boolean + scan all files / run gcov on it : would like to avoid this - same

Re: [CMake] Change LTO Type in CMake 3.9 with Clang?

2017-08-04 Thread Clément Gregoire
Not yet, but it is a known issue : https://gitlab.kitware.com/cmake/cmake/issues/16808 Le ven. 4 août 2017 à 06:03, Breannan Smith a écrit : > Testing the new LTO support in CMake 3.9, it appears that > setting INTERPROCEDURAL_OPTIMIZATION to TRUE causes CMake to pass >

Re: [CMake] DLL handling under CMake

2017-05-04 Thread Clément Gregoire
I'd also be interested in this. I saw an old mail in the ML about this, but it seems fixup_bundle is old and cant use generator expressions, making it hard to use (I don't want to hardcode the executable path). Do you have a sample for this ? CMake would really benefit from having those features

Re: [CMake] Good practice: using INTERFACE-libraries in FindABC.cmake?

2016-02-29 Thread Clément Gregoire
Speaking of imported targets, I'm wondering why alias imported targets aren't added to all default FindXXX.cmake scripts. This would help provide better examples, and have the community use better cmakelists.txt and hopefully reduce the bad usages of include_directories and such Le lun. 29 févr.

[CMake] Modules FindXXX.cmake for toolchains under windows

2015-08-06 Thread Clément Gregoire
Hi, I have some experience with cmake toolchain files, and wanted to try it under windows. Everything works fine (find_library, path etc) except find_package. I added a custom FindCTRULIB.cmake file in my folder D:/devkitPro/devkitArm and this folder is listed in my CMAKE_FIND_ROOT_PATH,

[CMake] Cmake and devkitpro

2015-02-16 Thread Clément Gregoire
Hi, I'm looking for a way to use CMake with the devkitpro toolchain ( http://sourceforge.net/projects/devkitpro/files/ ) I would like to be able to compile nds and 3ds homebrews. It is a gcc based toolchain, and users have to define DEVKITPRO and DEVKITARM env variables, giving the location of the