Re: [CMake] GTest confusion - linking to project being tested

2019-04-24 Thread Francis Giraldeau
Split your monolithic executable into a library and its main: add_library(core core.cpp) add_executable(main main.cpp) target_link_libraries(main core) Then, you can create gtest file and link to the core lib: add_executable(test_core test_core.cpp) target_link_libraries(test_core gtest

Re: [CMake] Fake dependencies of executables to static libs

2019-04-04 Thread Francis Giraldeau
Maybe the problem is related to Cotire? I see that it is used in mredis. I tried to reproduce the issue, and it behaves correctly. You might want to try to reproduce using the following minimal repo: https://gitlab.com/fgiraldeau/cotire-demo Francis Le jeu. 4 avr. 2019 à 03:17, Stephan Menzel

[CMake] Mixted C++/Fortran library on Windows [resolved]

2019-02-20 Thread Francis Giraldeau
I just wanted to share a solution for mixing C++ and Fortran programs on Windows using Visual Studio and Intel Fortran. The build was failing at link time with undefined symbols comming from fortran code. Actually, none of the fortran sources were compiled, even though it was working fine on Linux

Re: [CMake] fixup-bundle usability

2019-02-18 Thread Francis Giraldeau
ffering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://

[CMake] Qt translation handling

2019-01-17 Thread Francis Giraldeau
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc ) Cheers, Francis -- Francis Giraldeau -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more informat

Re: [CMake] How do I use install() with targets that might not be built?

2018-07-26 Thread Francis Giraldeau
rvices to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html

Re: [CMake] How to specify library dir for imported interface?

2018-07-09 Thread Francis Giraldeau
? Cheers, Francis -- Francis Giraldeau -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Supp

[CMake] How to specify library dir for imported interface?

2018-07-04 Thread Francis Giraldeau
is to add a global link_directories(). It is not clean, as it lacks the transitivity for library users, but at least it works. Cheers, Francis -- Francis Giraldeau -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitw

[CMake] How to specify library dir for imported interface?

2018-06-30 Thread Francis Giraldeau
/home/francis/local/lib However, it seems no property exists to actually specify the library dir of imported target, nor the linker flags to pass when using the imported target. What would be the best way to specify the library dir for an imported library? Thanks! Francis Giraldeau -- Francis

Re: [CMake] Why isn't target_link_libraries not enough in some cases?

2018-05-04 Thread Francis Giraldeau
this should be reported to SDL I guess. CMake Error at _deps/sdl2-build/cmake_install.cmake:188 (file): file INSTALL cannot find "[...]/build/_deps/sdl2-build/libSDL2.so". Call Stack (most recent call first): cmake_install.cmake:42 (include) Francis -- Francis Giraldeau -- Power