<div dir="ltr">Hello,<div><br></div><div>Try with add_executable / add_library before setting the source files properties.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 3:16 PM, Tom Browder <span dir="ltr"><<a href="mailto:tom.browder@gmail.com" target="_blank">tom.browder@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I found this 2009 thread:<br>
<br>
<a href="http://marc.info/?l=cmake&m=123851619629929&w=2" target="_blank">http://marc.info/?l=cmake&m=123851619629929&w=2</a><br>
<br>
discussing this issue and I tried all suggestions but still cannot get<br>
C files compiled with C++.<br>
<br>
The last suggestion was to glob all C source files and set a LANGUAGE<br>
CXX property on each. I put this at the very top of my master<br>
CMakeLists.txt file:<br>
<br>
file(GLOB_RECURSE all_c_files ${CMAKE_SOURCE_DIR}/src/*.c)<br>
set_source_files_properties(${all_c_files} PROPERTIES LANGUAGE CXX)<br>
<br>
to no avail (I also tried putting double quotes around the glob expression).<br>
<br>
Ideas?<br>
<br>
Best regards,<br>
<br>
-Tom<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Pau Garcia i Quiles<br><a href="http://www.elpauer.org">http://www.elpauer.org</a><br>(Due to my workload, I may need 10 days to answer)
</div>