Re: [CMake] target_include_directories and system headers

2018-06-27 Thread Nils Gladitz
On Thu, Jun 28, 2018 at 7:12 AM Jim Lloyd wrote: > [...] > But if I make a trivial project that simply includes yaml-cpp as a > dependency, the generated compile commands use `-isystem` to include the > yaml-cpp headers. > > Is this a bug in CMake? > > Also, is there any way I may be able to work

[CMake] How to change (and account for) default Visual Studio compiler flags

2018-06-27 Thread Jason Heeris
I'm using CMake (3.12 currently) in Windows 10 to build a DLL to be compatible with what an existing program expects. To this end, I need near-total control over the compiler and linker flags used to generate that DLL. I created a very simple project, with a single compilation unit, main.c, contai

[CMake] target_include_directories and system headers

2018-06-27 Thread Jim Lloyd
I am cross compiling to ARM using the g++ 7.2 compilers provided with the Xilinx SDK. This compiler was built using old assumptions about system headers being pure C, such that when compiled from a .cpp source, the header is wrapped in an `extern "C" {}`. This causes true C++ headers to fail when

[CMake] Framework installation problems with ninja

2018-06-27 Thread Shoaib Meenai
Let's say I have a simple CMakeLists.txt: cmake_minimum_required(VERSION 3.11) project(foo C) add_subdirectory(foo) foo/CMakeLists.txt looks like: add_library(foo SHARED foo.c) set_target_properties(foo PROPERTIES FRAMEWORK ON FRA

Re: [CMake] How can I compile and link modular code into a single DLL with MSVC?

2018-06-27 Thread Jason Heeris
On Thu, 28 Jun 2018 at 04:16, Innokentiy Alaytsev wrote: > I don't quite understand why are you using object libraries all over the project. Mainly because I tried a lot of things, and with the release of 3.12 I figured I'd try object libs again. > If those modules are not intended to be used ou

Re: [CMake] How can I compile and link modular code into a single DLL with MSVC?

2018-06-27 Thread Innokentiy Alaytsev
Hello!I've looked through the sources in your repo. I don't have CMake 3.12 right now, so I could not build it (Object library target "module1" may not link to anything). But that's not important.I don't quite understand why are you using object libraries all over the project. If those modules are