mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 13:27:09 +00:00
The documentation did not say which target generator expressions in source file properties refer to. They are evaluated separately for each target compiling the source, so a source shared by several targets can be compiled differently by each. Document this with an example and test a source shared by two targets.
13 lines
194 B
C
13 lines
194 B
C
#ifndef SHARED_ID
|
|
# error SHARED_ID not defined
|
|
#endif
|
|
|
|
#if SHARED_ID != EXPECTED_ID
|
|
# error SHARED_ID does not match EXPECTED_ID of the compiled target
|
|
#endif
|
|
|
|
int main(void)
|
|
{
|
|
return 0;
|
|
}
|