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
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
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
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_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
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
?
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
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
/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
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
10 matches
Mail list logo