diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-08-22 19:53:22 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-08-22 19:53:22 (GMT) |
commit | 59238dc2deb80f3f3d101de9a3945f890981a2c0 (patch) | |
tree | e44c156737f720dd26cc76f47e7e6a2d5bd54c4a /Modules/CMakeFindPackageMode.cmake | |
parent | 98472e45c86d0b8592e0a6361d392bfab921b3a0 (diff) | |
download | CMake-59238dc2deb80f3f3d101de9a3945f890981a2c0.zip CMake-59238dc2deb80f3f3d101de9a3945f890981a2c0.tar.gz CMake-59238dc2deb80f3f3d101de9a3945f890981a2c0.tar.bz2 |
Fix --find-package mode on Cygwin, where enable_language(RC) is called
In --find-package mode we can't enable a language, since a lot of
stuff has not been set up, e.g. which make tool to use.
So disable enable_language() in this mode.
Alex
Diffstat (limited to 'Modules/CMakeFindPackageMode.cmake')
-rw-r--r-- | Modules/CMakeFindPackageMode.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeFindPackageMode.cmake b/Modules/CMakeFindPackageMode.cmake index e0b5885..4296577 100644 --- a/Modules/CMakeFindPackageMode.cmake +++ b/Modules/CMakeFindPackageMode.cmake @@ -41,6 +41,12 @@ endif() # it doesn't know whether it should set WIN32 or not: cmake_minimum_required(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} ) +macro(ENABLE_LANGUAGE) + # disable the enable_language() command, otherwise --find-package breaks on Windows. + # On Windows, enable_language(RC) is called in the platform files unconditionally. + # But in --find-package mode, we don't want (and can't) enable any language. +endmacro() + include(CMakeDetermineSystem) # short-cut some tests on Darwin, see Darwin-GNU.cmake: |