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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to