Author: kuemmel
Date: Tue May 10 22:25:31 2011
New Revision: 38696
URL: http://www.lyx.org/trac/changeset/38696
Log:
cmake: -Dhelp=1 lists all options
Modified:
lyx-devel/trunk/CMakeLists.txt
lyx-devel/trunk/INSTALL.cmake
lyx-devel/trunk/development/cmake/modules/LyXMacros.cmake
Modified: lyx-devel/trunk/CMakeLists.txt
==============================================================================
--- lyx-devel/trunk/CMakeLists.txt Tue May 10 21:18:44 2011 (r38695)
+++ lyx-devel/trunk/CMakeLists.txt Tue May 10 22:25:31 2011 (r38696)
@@ -7,7 +7,6 @@
cmake_minimum_required(VERSION 2.6.4)
set(LYX_PROJECT lyx)
-project(${LYX_PROJECT})
set(LYX_CMAKE_DIR "development/cmake")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/${LYX_CMAKE_DIR}/modules")
@@ -17,13 +16,13 @@
set(CMAKE_PROJECT_NAME ${LYX_PROJECT})
+message(STATUS)
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(STATUS "Building in-source")
set(TOP_BINARY_DIR "${CMAKE_BINARY_DIR}/build")
else()
message(STATUS "Building out-of-source")
set(TOP_BINARY_DIR "${CMAKE_BINARY_DIR}")
- #cmake_policy(SET CMP0013 OLD)
endif()
@@ -82,7 +81,21 @@
LYX_OPTION(CONFIGURE_CHECKS "Also run configure checks for MSVC" OFF MSVC)
LYX_OPTION(DEPENDENCIES_DOWNLOAD "Download dependencies for MSVC 10" OFF MSVC)
+
+if(help OR HELP)
+ message(STATUS)
+ message(STATUS "Available options: (dis/enable with -D=0/1)")
+ message(STATUS)
+ LYX_OPTION_LIST_ALL(help)
+ message(STATUS)
+else()
+
+# 'project' triggers the searching for a compiler
+project(${LYX_PROJECT})
+
+
# Check option dependencies
+
if(LYX_CPACK)
set(LYX_INSTALL ON)
endif()
@@ -151,7 +164,7 @@
# Try to get some informations from configure.ac
-include(LyXPaths) #called here to define the needed TOP_SRC_DIR-variable
+include(LyXPaths)
file(STRINGS "${TOP_SRC_DIR}/configure.ac" _config_lines)
if(WIN32)
@@ -518,7 +531,7 @@
message(STATUS)
message(STATUS "Build options, switch LYX_* variables by -DLYX_*=1 or 0:")
message(STATUS)
-LYX_OPTION_LIST_ALL()
+LYX_OPTION_LIST_ALL(used)
set(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
@@ -604,4 +617,5 @@
#
message(STATUS)
+endif() #help
Modified: lyx-devel/trunk/INSTALL.cmake
==============================================================================
--- lyx-devel/trunk/INSTALL.cmake Tue May 10 21:18:44 2011 (r38695)
+++ lyx-devel/trunk/INSTALL.cmake Tue May 10 22:25:31 2011 (r38696)
@@ -132,17 +132,17 @@
Options could be passed by the -D prefix when running cmake.
Available options will be listed on each cmake run.
- Here the options with their default value:
+ -Dhelp=1 lists all available options:
# Available on all systems/compilers
-- LYX_CPACK = OFF : Use the CPack management (Implies
LYX_INSTALL option)
-- LYX_INSTALL = OFF : Build install projects/rules
(implies a bunch of other options)
- -- LYX_NLS = OFF : Use nls
+ -- LYX_NLS = ON : Use nls
-- LYX_ASPELL = OFF : Require aspell
-- LYX_ENCHANT = OFF : Require Enchant
-- LYX_HUNSPELL = OFF : Require Hunspell
-- LYX_DEVEL_VERSION = OFF : Build developer version
- -- LYX_RELEASE = ON : Build release version, build debug
when disabled
+ -- LYX_RELEASE = OFF : Build release version, build debug
when disabled
-- LYX_PACKAGE_SUFFIX = ON : Use version suffix for packaging
-- LYX_PCH = OFF : Use precompiled headers
-- LYX_MERGE_FILES = OFF : Merge source files into one
compilation unit
Modified: lyx-devel/trunk/development/cmake/modules/LyXMacros.cmake
==============================================================================
--- lyx-devel/trunk/development/cmake/modules/LyXMacros.cmake Tue May 10
21:18:44 2011 (r38695)
+++ lyx-devel/trunk/development/cmake/modules/LyXMacros.cmake Tue May 10
22:25:31 2011 (r38696)
@@ -261,7 +261,7 @@
macro(LYX_OPTION_LIST_ALL)
foreach(_option ${LYX_OPTIONS})
- if(${_option}_show_message)
+ if(${_option}_show_message OR ${ARGV0} STREQUAL "help")
string(SUBSTRING "${_option}
" 0 25 _var)
if(${_option})
set(_isset ON)