0

I have a working C project and just added some CPP stuff.

For includes I use include_directories("./src/") but the resulting commandline that is called from the generated makefile only contains "./src/" instead of the expected -I"./src/"

Whats going wrong with cmake here? Do I miss any difference between the C and the CPP compiler? Whe I add the -I to the commandline it just compiles as expected.

Tarion
  • 16,283
  • 13
  • 71
  • 107

1 Answers1

1

For everyone who finds the same Symptoms, it has nothing to do with it just missed the CXX in my project:

Changed

project(my-project C ASM)

to

project(my-project C CXX ASM)

Now it works... I hope it will save someone else the few hours I spend on this.

Tarion
  • 16,283
  • 13
  • 71
  • 107