Re: [CMake] CMake, VS, Nsight Tegra, NDK, mixed C/C++ - applies C++ options to C source

2016-12-15 Thread Scott Eberline
I suspect that if the first source in a target is C++, every source in that targets gets CMAKE_CXX_FLAGS, otherwise CMAKE_C_FLAGS. So for now, mixing C and C++ sources in the same target is broken. I worked around this issue by putting C sources in their own static library, and linking that into t

[CMake] CMake, VS, Nsight Tegra, NDK, mixed C/C++ - applies C++ options to C source

2016-12-14 Thread Scott Eberline
We have a large project library of mostly C++, mixed with a handful of C. The C++ compilation commands look correct and work fine. But C files are passed to clang++.exe -x c, rather than clang.exe. Which should work, except that CMAKE_CXX_FLAGS is applied while CMAKE_C_FLAGS is ignored. CMAKE_CXX_F