summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-11-19 10:18:51 (GMT)
committerAlex Neundorf <neundorf@kde.org>2011-11-19 10:18:51 (GMT)
commit982b766f29086b851fb4aee891e5e6d4bae95eb9 (patch)
tree3813288c808ca99d3dc46042ce702a3106d7d041
parent1110e455c20598983bbf435bd9356c1a952e305a (diff)
downloadCMake-982b766f29086b851fb4aee891e5e6d4bae95eb9.zip
CMake-982b766f29086b851fb4aee891e5e6d4bae95eb9.tar.gz
CMake-982b766f29086b851fb4aee891e5e6d4bae95eb9.tar.bz2
Eclipse: use new variable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
Previously ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT was used, but the new name CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT is more in line with the general naming conventions in cmake, and, more importantly IMO, in cmake-gui it now appears right next to the other eclipse-related variables, which all start with CMAKE_ECLIPSE_. A warning is printed if the old variable is TRUE and the new one isn't, so users should notice that they have to enable the new one. Alex
-rw-r--r--Modules/CMakeFindEclipseCDT4.cmake4
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx11
2 files changed, 12 insertions, 3 deletions
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index f7a6e29..dd06128 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -70,8 +70,8 @@ ENDIF()
SET(CMAKE_ECLIPSE_MAKE_ARGUMENTS "${_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
# This variable is used by the Eclipse generator in out-of-source builds only.
-SET(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
-MARK_AS_ADVANCED(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT)
+SET(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
+MARK_AS_ADVANCED(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT)
# Determine builtin macros and include dirs:
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 2e4e68f..07549e9 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -85,7 +85,16 @@ void cmExtraEclipseCDT4Generator::Generate()
this->IsOutOfSourceBuild = (this->HomeDirectory!=this->HomeOutputDirectory);
this->GenerateSourceProject = (this->IsOutOfSourceBuild &&
- mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT"));
+ mf->IsOn("CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT"));
+
+ if ((this->GenerateSourceProject == false)
+ && (mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT")))
+ {
+ mf->IssueMessage(cmake::WARNING,
+ "ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT is set to TRUE, "
+ "but this variable is not supported anymore since CMake 2.8.7.\n"
+ "Enable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT instead.");
+ }
if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
this->HomeDirectory.c_str()))