[CMake] Toolchain file: Texas Instrument C6000 Code Generation Tools
Laszlo Papp
lpapp at kde.org
Sat Feb 23 04:47:39 EST 2013
Oh, I might need to use the --run_linker (or --compile_only tentatively at
least) argument for the compiler. I will try that with
"CMAKE_C(XX)_COMPILER_ARG1". Apologize for the noise.
On Fri, Feb 22, 2013 at 8:35 PM, Laszlo Papp <lpapp at kde.org> wrote:
> Hi,
>
> I am now trying to put a toolchain file together for the aforementioned
> embedded environment on my Windows 7 workstation. You can see the file
> contents I have, and the errors I get below. When I just use the compiler
> against the one liner main.c, it works off hand. I also tried to force the
> C/C++ compilers, but even though the cmake ran fine, jom failed pretty much
> with the same error.
>
> Any help is much appreciated!
>
> Laszlo
>
> -----------------------------------------------------------------
> *
> main.c*
>
> int main() {return 0;}
>
> *CMakeLists.txt*
>
> add_executable(skeleton main.c)
>
> *ToolchainFile-C6000*
>
> # include("CMakeForceCompiler")
>
> set(CMAKE_SYSTEM_NAME "Sysbios")
> set(CMAKE_SYSTEM_VERSION "1.0")
> set(CMAKE_SYSTEM_PROCESSOR "C6000")
>
> set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}"
> "C:/ti/C6000 Code Generation Tools 7.3.0B3/bin"
> "C:/ti/C6000 Code Generation Tools 7.3.0B3/include"
> "C:/ti/C6000 Code Generation Tools 7.3.0B3/lib")
>
> # CMAKE_FORCE_C_COMPILER("C:/ti/C6000 Code Generation Tools
> 7.3.0B3/bin/cl6x.exe" "TI")
> # CMAKE_FORCE_CXX_COMPILER("C:/ti/C6000 Code Generation Tools
> 7.3.0B3/bin/cl6x.exe" "TI")
>
> SET(CMAKE_C_COMPILER "C:/ti/C6000 Code Generation Tools
> 7.3.0B3/bin/cl6x.exe")
> SET(CMAKE_CXX_COMPILER "C:/ti/C6000 Code Generation Tools
> 7.3.0B3/bin/cl6x.exe")
>
> set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
> set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
> set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
>
> *ERROR
> *
>
> cmake -G "NMake Makefiles JOM" -DCMAKE_TOOLCHAIN_FILE=../toolchain-cl6x.cmake ..
> -- The C compiler identification is TI_DSP 7.3.0
> -- The CXX compiler identification is TI_DSP 7.3.0
> -- Check for working C compiler: C:/ti/C6000 Code Generation Tools 7.3.0B3/bin/c
> l6x.exe
> -- Check for working C compiler: C:/ti/C6000 Code Generation Tools 7.3.0B3/bin/c
> l6x.exe -- broken
> CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTes
> tCCompiler.cmake:61 (message):
> The C compiler "C:/ti/C6000 Code Generation Tools 7.3.0B3/bin/cl6x.exe" is
> not able to compile a simple test program.
>
> It fails with the following output:
>
> Change Dir: C:/Projects/share/skeleton/build/CMakeFiles/CMakeTmp
>
>
>
> Run Build Command:jom "cmTryCompileExec2474985119\fast"
>
>
>
> jom 1.0.13 - empower your cores
>
>
>
> "C:\Program Files (x86)\jom\jom.exe" -f
> CMakeFiles\cmTryCompileExec2474985119.dir\build.make /nologo -
> CMakeFiles\cmTryCompileExec2474985119.dir\build
>
> "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_repor
> t
> C:\Projects\share\skeleton\build\CMakeFiles\CMakeTmp\CMakeFiles 1
>
> Building C object
> CMakeFiles/cmTryCompileExec2474985119.dir/testCCompiler.c.obj
>
> C:\ti\C6000C~1.0B3\bin\cl6x.exe -o
> CMakeFiles\cmTryCompileExec2474985119.dir\testCCompiler.c.obj -c
> C:\Projects\share\skeleton\build\CMakeFiles\CMakeTmp\testCCompiler.c
>
> [testCCompiler.c]
>
> >> WARNING: object file specified, but linking not enabled
>
> Linking C executable cmTryCompileExec2474985119
>
> C:\ti\C6000C~1.0B3\bin\cl6x.exe
> "CMakeFiles\cmTryCompileExec2474985119.dir\testCCompiler.c.obj" -o
> cmTryCompileExec2474985119
>
> [cmTryCompileExec2474985119.]
>
> >> WARNING: object file specified, but linking not enabled
>
> Fatal error: could not open source file "cmTryCompileExec2474985119"
>
> 1 fatal error detected in the compilation of "cmTryCompileExec2474985119".
>
> Compilation terminated.
>
>
>
> jom:
> C:\Projects\share\skeleton\build\CMakeFiles\CMakeTmp\CMakeFiles\cmTryCompileEx
> ec2474985119.dir\build.make
> [cmTryCompileExec2474985119] Error 1
>
> >> Compilation failure
>
> jom: C:\Projects\share\skeleton\build\CMakeFiles\CMakeTmp\Makefile
> [cmTryCompileExec2474985119\fast] Error 2
>
>
>
>
>
> CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>
>
>
> -- Configuring incomplete, errors occurred!
>
> C:\Projects\share\skeleton\build>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130223/53e4a3a9/attachment-0001.htm>
More information about the CMake
mailing list