Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cmake's CMAKE_TOOLCHAIN_FILE being ignored

cmake is ignoring my toolchain file for some reason:

lynxos.cmake:

set(CMAKE_SYSTEM_NAME LynxOS)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_CXX_COMPILER /usr/los178/2.3.0/x86_dev/cdk/linux-coff-x86/usr/bin/g++)
set(CMAKE_C_COMPILER /usr/los178/2.3.0/x86_dev/cdk/linux-coff-x86/bin/gcc)
set(CMAKE_FIND_ROOT_PATH /usr/los178/2.3.0/x86_dev/cdk/linux-coff-x86/)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

the call to cmake:

cmake -DCMAKE_TOOLCHAIN_FILE=lynxos.cmake -DUSE_TINY_XML=TRUE

CMAKE_CXX_COMPILER is still defaulting to my default compiler. Setting the CMAKE_CXX_COMPILER using -D from the command line works but cmake gives a warning:

You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= <path to compiler>
CMAKE_CXX_COMPILER= <path to compiler>

then my other cmake variables become undefined.

tried deleting the CMakeCache.txt file. Not working. Using CMake 2.8.11. Any idea what's wrong?

like image 733
Daniel Ogburn Avatar asked Dec 15 '22 02:12

Daniel Ogburn


1 Answers

CMake creates alot more than 1 cache file, I'd try first doing it from a completely different directory.

like image 175
IdeaHat Avatar answered Dec 27 '22 11:12

IdeaHat