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?
CMake creates alot more than 1 cache file, I'd try first doing it from a completely different directory.
Whenever you run cmake always use a clean directory. if you ls -a you'll see a lot of cache files. If you try to run cmake again it will probably use a lot of those cached files. I ran into this issue recently too. just cd ..; rm -rf build/**;cd build to clean your directory and run cmake again