Here is an updated version of your example with working exporting of
Module3 and importing inside Module4 ( I ignored the XML lib importing
)
CMake_with_exporting.tar.xz
Description: application/xz
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://
I think, I missunderstood some parts. In particular, why should the user have to change the CMakeLists.txt? He/she can set the value at the commandline or in the cmake-gui and your CMakelist sees the value of your option and can react to that.
Gesendet: Montag, 11. Juni 2018 um 10:55 Uhr
Von: "C
Hello Cornelis,
I'm not sure if I get your use-case completely, but somtimes I also have the
need for three-state variables. What I usually do:
set(MY_OPTION "AUTO" CACHE STRING "Documentation for my option")
set_property(CACHE MY_OPTION STRINGS "ON:OFF:AUTO")
if("${MY_OPTION}" STREQUAL AUTO)
Thanks for your proposals!
Actually my problem is basically that I want to keep up with some
minimum good practice, but I am seeing myself throwing it over board
constantly if I do not find a logical solution after one or two hours
of struggling...
Your second option is close to what I am currently
Dear Cornelis,
your description looks to me like having a three valued option: ON, OFF, UNDEFINED. But an option in cmake language has only two values: ON or OFF.
To solve your problem with the connection between your sub-project and the main project, you should forget about the main project
Dear CMake users,
Maybe my question is trivial for most, but still I do not find an
answer on my own!
If you have a project and some sub-project (or module or whatever the
jargon is) that are both managed with CMake, they should be in separate
directories (directory trees), and each of them have
Hi Romain,
Just to give you more insight on this and add details on top of Juan's
answer, CMake will only able to find libraries with the .lib extension
because it is what you are supposed to link against. And CMake explicitly
defines that in the following file:
https://gitlab.kitware.com/cmake/c