Stephen Kelly 38afc82e76 target_include_directories: Allow relative path with genex
Treat paths which are relative and which contain a generator
expression which is not at the beginning as relative to the
source directory.

This matches the behavior of paths which are relative but contain
no generator expression at all.

Previously this would generate a relative path with the IMPORTED
target on export(), which would be a reported as a non-existent
path on import. If used directly in the buildsystem, it would be
reported as a relative path, which is also an error. There is no
need for a policy in this case.
2013-11-26 10:30:18 +01:00

33 lines
575 B
C++

#include "common.h"
#include "publicinclude.h"
#include "interfaceinclude.h"
#include "relative_dir.h"
#include "consumer.h"
#ifdef PRIVATEINCLUDE_DEFINE
#error Unexpected PRIVATEINCLUDE_DEFINE
#endif
#ifndef PUBLICINCLUDE_DEFINE
#error Expected PUBLICINCLUDE_DEFINE
#endif
#ifndef INTERFACEINCLUDE_DEFINE
#error Expected INTERFACEINCLUDE_DEFINE
#endif
#ifndef CURE_DEFINE
#error Expected CURE_DEFINE
#endif
#ifndef RELATIVE_DIR_DEFINE
#error Expected RELATIVE_DIR_DEFINE
#endif
#ifndef CONSUMER_DEFINE
#error Expected CONSUMER_DEFINE
#endif
int main() { return 0; }