Hello again: For some reason when I try to compile a simple C++ program, it takes the wrong compiler, even though I am setting the appropriate one in the Toolchain file; I am working on Cygwin, and I am trying to compile for a LInux environment using g++-linux compiler, which I tested it and works correctly.
I have a folder named helloC++-linux, where I have all my stuff: A simple hello.cpp program My CMakeLists.txt contains: #CMakeLists.txt : CMake configuration file PROJECT(helloC++-linux CXX) #States that CMake required version must be >= 2.6 CMAKE_MINIMUM_REQUIRED(VERSION 2.6) #File to build and executable: ADD_EXECUTABLE(hello.o hello.cpp) My Toolchain file (named Toolchain-linuxcpp.cmake) contains: SET(CMAKE_SYSTEM_NAME Linux) #specify the cross-compiler SET(CMAKE_CXX_COMPILER /bin/g++-linux) and I tried to build it using following command: cmake -DCMAKE_TOOLACHAIN_FILE=./Toolchain-linuxcpp.cmake . But when building, CMake looks for a compiler, and takes /usr/bin/c++.exe instead of /bin/g++-linux. I tried also using CMAKE_FORCE_CXX_COMPILER, but I got the same results. Is there any way of make it take the compiler from /bin, instead of from /usr/bin ? Thanks Best Regards Enrique
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake