diff options
author | Orkun Tokdemir <ilhanorkuntokdemir@gmail.com> | 2023-04-27 09:28:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-03 13:03:46 (GMT) |
commit | 7bf4e3009000b0ab576f364abc779e9a1599af08 (patch) | |
tree | bcdca570fc94f317746a03adf9b54237df1ce9fd /Source/cmQtAutoGenInitializer.cxx | |
parent | 033dc7ee2f02b0ebdfd1bc4edbcb24d1fc8c4152 (diff) | |
download | CMake-7bf4e3009000b0ab576f364abc779e9a1599af08.zip CMake-7bf4e3009000b0ab576f364abc779e9a1599af08.tar.gz CMake-7bf4e3009000b0ab576f364abc779e9a1599af08.tar.bz2 |
Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not set
Add policy CMP0151 to preserve the old behavior by default.
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index deb2c04..544e1ef 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -587,7 +587,18 @@ bool cmQtAutoGenInitializer::InitCustomTargets() addBefore = true; } } else { - addBefore = true; + switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0151)) { + case cmPolicies::WARN: + case cmPolicies::OLD: + addBefore = true; + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::NEW: + this->GenTarget->AddSystemIncludeDirectory(this->Dir.IncludeGenExp, + "CXX"); + break; + } } this->GenTarget->AddIncludeDirectory(this->Dir.IncludeGenExp, addBefore); } |