MantisBT - CMake
View Issue Details
0013448CMakeCMakepublic2012-07-31 21:042012-12-03 07:46
LynnKaye 
David Cole 
highmajoralways
closedno change required 
Linux 2.6.18-164.el5 x86_64
CMake 2.8.8 
CMake 2.8.8 
0013448: Cannot detect extensions of cpp files
When I try to go over the tutorial, I write

add_executable(Tutorial tutorial.cxx)

while I have a tutorial.cpp file. When I run cmake, it says

Cannot find source file:

    tutorial.cxx

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

When I change the file extension from .cpp to .cxx, it builds successfully. Apparently, it fails to find the tutorial.cpp
No tags attached.
Issue History
2012-07-31 21:04LynnKayeNew Issue
2012-07-31 23:12David ColeAssigned To => David Cole
2012-07-31 23:12David ColeStatusnew => assigned
2012-07-31 23:15David ColeNote Added: 0030155
2012-07-31 23:15David ColeStatusassigned => resolved
2012-07-31 23:15David ColeFixed in Version => CMake 2.8.8
2012-07-31 23:15David ColeResolutionopen => no change required
2012-12-03 07:46David ColeNote Added: 0031800
2012-12-03 07:46David ColeStatusresolved => closed

Notes
(0030155)
David Cole   
2012-07-31 23:15   
This is not really misbehaving.... The 2nd argument to add_executable is a filename.

If your file is named t.cpp then list t.cpp as the file, if cxx then cxx.

Don't explicitly list one and expect the other to work.
(0031800)
David Cole   
2012-12-03 07:46   
Closing resolved issues that have not been updated in more than 4 months.