On Saturday 27 February 2010, Oleg Kravchenko wrote: > Hello i am try build tinyxml library by mingw32 on gentoo linux with cmake: > =dev-util/cmake-2.6.4-r3 > =dev-util/cmake-2.8.0-r2 > > But have this errors: > $ cmake -DCMAKE_TOOLCHAIN_FILE=~/i686-pc-mingw32.cmake - > DDOKAN_INCLUDE_DIR=~/projects/dokan/ -DCMAKE_BUILD_TYPE=Debug . > -- The C compiler identification is GNU > -- The CXX compiler identification is GNU > -- Check for working C compiler: /usr/bin/i686-pc-mingw32-gcc > -- Check for working C compiler: /usr/bin/i686-pc-mingw32-gcc -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Check for working CXX compiler: /usr/bin/i686-pc-mingw32-g++ > -- Check for working CXX compiler: /usr/bin/i686-pc-mingw32-g++ -- works > -- Detecting CXX compiler ABI info > -- Detecting CXX compiler ABI info - done > -- Configuring done > -- Generating done > -- Build files have been written to: /home/kaa/projects/tinyxml > $ make > [ 12%] Building CXX object > tinyxml_build/CMakeFiles/tinyxml.dir/tinystr.cpp.obj > [ 25%] Building CXX object > tinyxml_build/CMakeFiles/tinyxml.dir/tinyxml.cpp.obj > [ 37%] Building CXX object > tinyxml_build/CMakeFiles/tinyxml.dir/tinyxmlerror.cpp.obj > [ 50%] Building CXX object > tinyxml_build/CMakeFiles/tinyxml.dir/tinyxmlparser.cpp.obj > Linking CXX static library > /home/kaa/projects/sqlfs/target/Debug/libtinyxml.a Error running link > command: No such file or directory > make[2]: *** [/home/kaa/projects/win32/target/Debug/libtinyxml.a] Error 2 > make[1]: *** [tinyxml_build/CMakeFiles/tinyxml.dir/all] Error 2 > make: *** [all] Error 2 > > I "fix" problem by patching CMakeFindBinUtils.cmake > > Please fix and release 2.6.x and 2.8.x version
Strange. Please apply the attached patch to CMakeDetermineCCompiler.cmake and run cmake again on a fresh build dir, and post the output. Alex
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 17fa05f..520144a 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -68,8 +68,11 @@ IF(NOT CMAKE_C_COMPILER) IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER) SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C compiler" FORCE) ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER) + message(STATUS "Found CMAKE_C_COMPILER: -${CMAKE_C_COMPILER}-") + ELSE(NOT CMAKE_C_COMPILER) + message(STATUS "CMAKE_C_COMPILER was preset: -${CMAKE_C_COMPILER}-") # we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE # if CMAKE_C_COMPILER is a list of length 2, use the first item as @@ -94,6 +97,8 @@ ELSE(NOT CMAKE_C_COMPILER) SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE) ENDIF(CMAKE_C_COMPILER_WITH_PATH) ENDIF(NOT _CMAKE_USER_C_COMPILER_PATH) + message(STATUS "CMAKE_C_COMPILER now set to: -${CMAKE_C_COMPILER}-") + ENDIF(NOT CMAKE_C_COMPILER) MARK_AS_ADVANCED(CMAKE_C_COMPILER) @@ -101,6 +106,8 @@ IF (NOT _CMAKE_TOOLCHAIN_LOCATION) GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH) ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION) +message(STATUS "Toolchain location: -${_CMAKE_TOOLCHAIN_LOCATION}-") + # Build a small source file to identify the compiler. IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") SET(CMAKE_C_COMPILER_ID_RUN 1) @@ -149,12 +156,16 @@ ENDIF(NOT CMAKE_C_COMPILER_ID_RUN) # NAME_WE cannot be used since then this test will fail for names lile # "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be # "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-" +message(STATUS "C Compiler ID: -${CMAKE_C_COMPILER_ID}-") +message(STATUS "Toolchain prefix: -${_CMAKE_TOOLCHAIN_PREFIX}-") IF (CMAKE_CROSSCOMPILING AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _CMAKE_TOOLCHAIN_PREFIX) + message(STATUS "Getting toolchain location...") GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME) IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$") SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + message(STATUS "Got toolchain location: -${_CMAKE_TOOLCHAIN_PREFIX}- match1: -${CMAKE_MATCH_1}-") ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$") # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
_______________________________________________ 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