[CMake] relative path to toolchain does not work

hex hex7c3 at gmail.com
Fri Jul 19 06:23:40 EDT 2019


Yes, this was the problem. I was running cmake .. -LA to check the cache 
variables /before/ setting the toolchain. You can even see that the 
CMAKE_TOOLCHAIN_FILE is not set.

It is working now, thank you.


On 17/07/2019 18:12, Robert Maynard wrote:
> Is this with a clean build directory? The toolchain file is ignored
> once CMake has run and has done compiler detection.
>
> On Wed, Jul 17, 2019 at 11:29 AM hex<hex7c3 at gmail.com>  wrote:
>> I specified my toolchain like so:
>>
>> 1cmake -DCMAKE_TOOLCHAIN_FILE=myToolchain.cmake ..
>>
>> and created a toolchain file in project/myToolchain.cmake.
>>
>> Using relative path CMake first looks relative to the top of the build directory, then if not found there, relative to the top of the source directory.
>>
>> What means “the top of the source directory”? I placed the file in the source directory and receive:
>>
>> 1234CMake Warning:
>>    Manually-specified variables were not used by the project:
>>
>>      CMAKE_TOOLCHAIN_FILE
>>
>> --
>>
>> Powered bywww.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 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 athttp://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> https://cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190719/c1e50ba8/attachment-0001.html>


More information about the CMake mailing list