diff options
author | Brad King <brad.king@kitware.com> | 2017-08-29 15:21:58 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-29 15:30:07 -0400 |
commit | 18454ea44d6a1fd2dbc613ad9c3fe941639563aa (patch) | |
tree | 7dd7d008d7734d70f5a76b2ab2810e6c025eb2cb /Source/cmakemain.cxx | |
parent | fca4423786ba2c4a5ab0ec6c1a1cbac8cd8600b4 (diff) | |
download | cmake-18454ea44d6a1fd2dbc613ad9c3fe941639563aa.tar.gz |
cmake: Fix --find-package mode with imported targets
The change in commit v3.9.0-rc1~116^2~6 (cmakemain: use script role for
-P, 2017-05-11) accidentally left project commands out of find-package
mode, causing packages that provide imported targets to break.
Fixes: #17124
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index c5a6836bf6..da1fe6d641 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -306,7 +306,7 @@ int do_cmake(int ac, char const* const* av) return ret; } cmake::Role const role = - workingMode == cmake::NORMAL_MODE ? cmake::RoleProject : cmake::RoleScript; + workingMode == cmake::SCRIPT_MODE ? cmake::RoleScript : cmake::RoleProject; cmake cm(role); cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); |