[CMake] set the compiler
Lev
leventelist at gmail.com
Fri Sep 23 13:54:35 EDT 2016
Hello all,
I know it is not recommended, but I try to do something like this:
if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
set (CMAKE_C_COMPILER "gcc")
elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
set (CMAKE_C_COMPILER "clang37")
endif ()
cmake complains, that gcc is not in my path, but it is.
leva at jive:~$ which gcc
/usr/bin/gcc
I haven't tried it on the FreeBSD yet.
Any solutions for this?
Thanks,
Lev
--
73 de HA5OGL
Op.: Levente
More information about the CMake
mailing list