MantisBT - CMake
View Issue Details
0009616CMakeCMakepublic2009-09-29 09:582009-10-30 11:27
Mathieu Malaterre 
Brad King 
normalmajoralways
closedfixed 
CMake-2-8 
CMake-2-8 
0009616: SetLang does not work in xlC
SetLANG Test is not working:

http://www.cdash.org/CDash/viewTest.php?onlyfailed&buildid=437487 [^]

/opt/ibmcmp/vacpp/9.0/bin/xlC -o CMakeFiles/SetLang.dir/bar.c.o -c "/home/mmalater/Dashboards/My Tests/CMakeXLC/Tests/SetLang/bar.c"
"/home/mmalater/Dashboards/My Tests/CMakeXLC/Tests/SetLang/bar.c", line 4.1: 1506-166 (S) Definition of function class requires parentheses.
"/home/mmalater/Dashboards/My Tests/CMakeXLC/Tests/SetLang/bar.c", line 4.7: 1506-275 (S) Unexpected text A encountered.
"/home/mmalater/Dashboards/My Tests/CMakeXLC/Tests/SetLang/bar.c", line 7.7: 1506-277 (S) Syntax error: possible missing ';' or ','?
"/home/mmalater/Dashboards/My Tests/CMakeXLC/Tests/SetLang/bar.c", line 7.8: 1506-045 (S) Undeclared identifier this.
"/home/mmalater/Dashboards/My Tests/CMakeXLC/Tests/SetLang/bar.c", line 13.5: 1506-275 (S) Unexpected text a encountered.
"/home/mmalater/Dashboards/My Tests/CMakeXLC/Tests/SetLang/bar.c", line 14.6: 1506-045 (S) Undeclared identifier a.
gmake[2]: *** [CMakeFiles/SetLang.dir/bar.c.o] Error 1
According to documentation:

 -qsourcetype=<type>
              Determines whether to treat all recognized source files as if they are of the source type specified by <type> (regardless of file name suffix), or whether to use the file name suffix to determine the programming language.
              Note that the option only affects files that are specified on the command line following the option, but not those that precede the option. The -qsourcetype option should not be used together with the -+ option. The suboptions are:

              default
                   The compiler assumes that the programming language of a source file will be implied by its file name suffix.
              c
                   The compiler compiles all source files following this option as if they are C language source files.
              assembler
                   The compiler compiles all source files following this option as if they are assembler language source files.
              assembler-with-cpp
                   The compiler compiles all source files following this option as if they are assembler language source files that need preprocessing.

              Default: -qsourcetype=default
No tags attached.
Issue History
2009-09-29 09:58Mathieu MalaterreNew Issue
2009-09-29 11:35Bill HoffmanStatusnew => assigned
2009-09-29 11:35Bill HoffmanAssigned To => Brad King
2009-09-29 11:35Bill HoffmanNote Added: 0017823
2009-09-29 11:48Mathieu MalaterreNote Added: 0017824
2009-09-29 14:11Brad KingNote Added: 0017830
2009-10-30 11:27Mathieu MalaterreNote Added: 0018296
2009-10-30 11:27Mathieu MalaterreStatusassigned => closed
2009-10-30 11:27Mathieu MalaterreResolutionopen => fixed
2009-10-30 11:27Mathieu MalaterreFixed in Version => CMake-2-8

Notes
(0017823)
Bill Hoffman   
2009-09-29 11:35   
This is a new Compiler for CMake, this has never worked. Patches are welcome. :) How do you get/install this compiler?
(0017824)
Mathieu Malaterre   
2009-09-29 11:48   
You can get a trial at:

http://www-01.ibm.com/software/awdtools/xlcpp/linux/ [^]

Did you see the additional info where I mention you need to pass -qsourcetype to the compiler to specify the language (I am guessing CMAKE_CXX_COMPILE_OBJECT) ?

Thanks !
(0017830)
Brad King   
2009-09-29 14:11   
AIX.cmake has this:

  SET(CMAKE_CXX_COMPILE_OBJECT
    "<CMAKE_CXX_COMPILER> -+ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")

Try adding it to "Compiler/XL-CXX.cmake".
(0018296)
Mathieu Malaterre   
2009-10-30 11:27   
I think this is working now