It does work after setting CMAKE_C_SOURCE_FILE_EXTENSIONS inside the override. It should be set in a CMakeDetermineCompiler file though. I'll add language support for it next.

As a side note, wouldn't it be better to replace

CMake/Modules/CMakeCCompiler.cmake.in:

/set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)/


with:

/list(APPEND CMAKE_C_SOURCE_FILE_EXTENSIONS c;m )/

?


On 30/08/2019 12:41, hex wrote:
I am still facing a problem: The build step is skipped only the link step is performed (I missed that in the beginning). It seems like the build step does not have any dependencies.


This is because different file extension are used. I cannot set CMAKE_C_SOURCE_FILE_EXTENSIONS because I believe `project` redefines the variable. If I set it afterwards it does not take effect. For now it works if I change the source file extension.

-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to