[CMake] cmake 3.2.2 ignores toolchain file
Zvi Vered
veredz72 at gmail.com
Tue May 5 17:14:05 EDT 2015
Hello,
I’m running cmake 3.2.2 under win7-64.
I used the following toolchain file;
*************************************
INCLUDE(CMakeForceCompiler)
SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_CROSSCOMPILING TRUE)
SET(CMAKE_FORCE_C_COMPILER chc12 MetrowerksHicross)
#SET(CMAKE_C_COMPILER D:/WorkBench_3_3_2/diab/5.9.1.0/WIN32/bin/dcc)
SET(CMAKE_C_FLAGS -g)
SET(CMAKE_AR D:/WorkBench_3_3_2/diab/5.9.1.0/WIN32/bin/dar)
SET(CMAKE_COMPILER_IS_GNUCC FALSE)
SET(CMAKE_C_COMPILER_ID 0)
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
****************************************
Then I ran:
cmake ../libssh-0.6.4 -DCMAKE_TOOLCHAIN_FILE=toolchain.txt
And got:
D:\zvi_vered\library\libssh\libssh\build>cmake
../libssh-0.6.4 -DCMAKE_TOOLCHAIN_FILE=toolchain.txt
-- Building for: Visual Studio 9 2008
-- The C compiler identification is MSVC 15.0.30729.1
-- Check for working C compiler using: Visual Studio 9 2008
-- Check for working C compiler using: Visual Studio 9 2008 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error at
C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/FindPackageHandl
Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
Call Stack (most recent call first):
C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/FindPackageHandleStandardArgs
cmake/Modules/FindZLIB.cmake:112 (find_package_handle_standard_args)
CMakeLists.txt:44 (find_package)
It seems CMake ignores my toolchain file.
Why does it insist "Building for Visual Studio 9 2008" ?
I also tried entering a full path of toolchain.txt
When I entered an invalid path I got the same output.
Best regards,
Zvika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150506/299e1d6d/attachment.html>
More information about the CMake
mailing list