I'm wondering if there is a possibility to configure cmake, that it's possible to make a difference if headerfiles are included with #include<...>
or #include "..."
?
Lets assume that I have a project like this:
src
foo.h
foo.c
lib
foo.h
foo.c
How can be achieved to add the file src/foo.h
by writting #include "foo.h"
and if the headerfile is included with #include <foo.h>
the file at location lib/foo.h
is loaded?
It always load the files from the first include_directories()
command
include_directories(src)
include_directories(lib)
EDIT
My current problem inside my project:
I have a file named string.h
. Which contains some function for custom text handling. Now I have the problem that if I write #include <string.h>
my custom file is loaded, but I expect the system file string.h
. I don't want to rename my custom file nor I want to move it inside a folder to include it like #include "custum/string.h"
All I want is:
#include <string.h> // load file from system library
#include "string.h" // load my custom file
I used it inside IDE Keil like this ways, but I don't know if it can be done with cmake