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

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

2016-12-14 Thread Florent Castelli
I'm pretty sure that the toolchain bundled with the NDK, made by Google, hasn't been tested with other generators than Ninja or possibly Make. Also, there are some known bugs with it, including the one related to CMAKE_CXX_STANDARD (see https://code.google.com/p/android/issues/detail?id=227915

[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.