On Tue, Mar 17, 2015 at 12:10 AM, Dave Yost wrote:
> set_source_files_properties(foo.bar  PROPERTIES  LANGUAGE  CXX)
[snip]
> [100%] Building CXX object CMakeFiles/foo.dir/foo.bar.o
> c++: warning: /Users/yost/p/c++/cmake/asm/foo.bar: linker input file unused
> because linking not done
> Linking CXX executable foo
> c++: error: CMakeFiles/foo.dir/foo.bar.o: No such file or directory

The LANGUAGE property just tells CMake what the language is in
case CMake does not know an extension supported by a particular
compiler.  It does not cause the "-x c++" or similar flag to be added:

 http://www.cmake.org/Bug/view.php?id=14516

The latter is needed to convince the compiler of the language.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to