[CMake] CMake 2.8.6 --> 2.8.8 New TryCompile Fails on GCC-GNAT Ada Linking
Bill Hoffman
bill.hoffman at kitware.com
Mon Jul 2 11:38:22 EDT 2012
On 7/2/2012 11:22 AM, Matthew Schuchard wrote:
> Attached tarball of CMakeTmp after failed Ada TryCompile.
>
> Relevant from CMakeTestAdaCompiler:
>
> IF(NOT CMAKE_Ada_COMPILER_WORKS)
> PrintTestCompilerStatus("Ada" "")
> FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmTryCompileExec.adb
> "with Ada.Text_IO;\n"
> "use Ada.Text_IO;\n"
> "procedure cmTryCompileExec is\n"
> "begin\n"
> "Put(\"Hello World\");\n"
> "end cmTryCompileExec;\n")
> TRY_COMPILE(CMAKE_Ada_COMPILER_WORKS ${CMAKE_BINARY_DIR}
> ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmTryCompileExec.adb
> OUTPUT_VARIABLE OUTPUT)
> SET(Ada_TEST_WAS_RUN 1)
> ENDIF(NOT CMAKE_Ada_COMPILER_WORKS)
So, the generated CMake file looks like this:
ADD_EXECUTABLE(cmTryCompileExec2054790633
"/users/ms503/gtsims/bld/CMakeFiles/CMakeTmp/cmTryCompileExec.adb")
That does not look bad to me. However, since you did not include the
Platform ADA files you are using, the problem could be there. Does the
executable name have to match the .adb file?
-Bill
More information about the CMake
mailing list