[CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.
Abdelrazak Younes
ayounes at marvell.com
Fri Dec 9 04:47:24 EST 2011
-----Original Message-----
From: Abdelrazak Younes
> So now I will try to remove CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables
> and modify Modules/CMakeFindBinUtils.cmake; I hope I can use a local copy
> for this file.
It seems I can use a local copy of it as I got a warning about that (see below). So I modified my local copy with the diff below but it doesn't work, /usr/bin/ar is still used. One additional question: armar is apparently doing the job of ar and ranlib so I don't want ranlib to be used afterwards so please tell me how to avoid that.
Cheers,
Abdel.
The diff:
diff -u /usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake ../cmake/Modules/CMakeFindBinUtils.cmake
--- /usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake 2011-07-08 14:21:44.000000000 +0200
+++ ../cmake/Modules/CMakeFindBinUtils.cmake 2011-12-09 10:32:04.049725221 +0100
@@ -38,8 +38,13 @@
MARK_AS_ADVANCED(CMAKE_LINKER)
+ELSEIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "RVDS"
+ OR "${CMAKE_C_COMPILER_ID}" MATCHES "RVDS")
+
+ FIND_PROGRAM(CMAKE_AR NAMES armar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+
# in all other cases search for ar, ranlib, etc.
ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
The cmake call with the warning:
cmake ../src -Drvds=1 -Dfirmware=$2 -DCMAKE_TOOLCHAIN_FILE=../cmake/LinuxRvdsToolchain.cmake
-- The C compiler identification is RVDS
-- The CXX compiler identification is unknown
-- Check for working C compiler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working C compiler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working CXX compiler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Compiling for ARM platform
-- The ASM-RVDS compiler identification is unknown
CMake Warning (dev) at /usr/share/cmake-2.8/Modules/CMakeDetermineASMCompiler.cmake:156 (INCLUDE):
File /usr/share/cmake-2.8/Modules/CMakeDetermineASMCompiler.cmake includes
xxxx/src/../cmake/Modules/CMakeFindBinUtils.cmake
(found via CMAKE_MODULE_PATH) which shadows
/usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake. This may cause
errors later on .
Policy CMP0017 is not set: Prefer files from the CMake module directory
when including from there. Run "cmake --help-policy CMP0017" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Call Stack (most recent call first):
xxxx/cmake/Modules/CMakeDetermineASM-RVDSCompiler.cmake:3 (INCLUDE)
yyyy/CMakeLists.txt:5 (enable_language)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found assembler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armasm
-- Configuring done
-- Generating done
-- Build files have been written to: xxx
More information about the CMake
mailing list