[CMake] Wrong CMAKE_SYSTEM_NAME handling

J Decker d3ck0r at gmail.com
Sat Jan 3 18:11:57 EST 2015


On Sat, Jan 3, 2015 at 1:50 PM, Marco Milanese <marcomilanese7 at gmail.com>
wrote:

> Hi,
>
> I'm trying to setup a cross compile CMakeLists.txt. My target is a embedded
> ARM core.
> This is my CMakeLists.txt <https://gist.github.com/a1849d9b5ff02606e860>
> .
>
> The linker script seems wrong:
> mm7 at pc5:~/test/cmake/build$ cat CMakeFiles/target.dir/link.txt
> arm-none-eabi-g++       CMakeFiles/target.dir/test.cpp.o  -o target
> -rdynamic
>
> I can't understand why is "-rdynamic" appended. It should be appended only
> if "CMAKE_SYSTEM_NAME"=Linux
> (
> https://github.com/Kitware/CMake/blob/4811915367cc23e68e2171b83509b8a382ff1941/Modules/Platform/Linux-GNU.cmake#L24
> ).
>
>
try setting cmake_system_name before project()
Ninja uses that is it's cmakelists.txt; but it appears before project.  I
use it in a toolcain file and toolchain is loaded before cmakelists so also
before Project()


> Is this a CMake bug or am I making some mistakes? Thank you
>
> Marco
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Wrong-CMAKE-SYSTEM-NAME-handling-tp7589372.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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 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://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150103/bc2c074d/attachment-0001.html>


More information about the CMake mailing list