endif()
if(NOT help AND NOT HELP)
- # 'project' triggers the searching for a compiler
- project(${LYX_PROJECT})
+ # 'project' triggers the searching for a compiler
+ project(${LYX_PROJECT})
+ if (CMAKE_COMPILER_IS_GNUCXX)
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0")
+ message(STATUS "Gnu CXX compiler version = ${CMAKE_CXX_COMPILER_VERSION}")
+ message(STATUS "is too old, should be >= 4.0")
+ message(FATAL_ERROR "Exiting")
+ endif()
+ endif()
endif()
if(UNIX)
LYX_OPTION(DEBUG_GLIBC "Enable libstdc++ debug mode" OFF GCC)
LYX_OPTION(DEBUG_GLIBC_PEDANTIC "Enable libstdc++ pedantic debug mode" OFF GCC)
LYX_OPTION(STDLIB_DEBUG "Use debug stdlib" OFF GCC)
-LYX_OPTION(CONCEPT_CHECKS "Enable concept-checks" OFF GCC)
LYX_OPTION(PROFILE "Build with options for gprof" OFF GCC)
LYX_OPTION(ENABLE_CXX11 "Build with options for c++11-mode" OFF GCC)
if(LYX_STDLIB_DEBUG)
set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
endif()
- if(LYX_CONCEPT_CHECKS)
- set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCPP_CONCEPT_CHECKS")
- endif()
set(CMAKE_CXX_FLAGS "${LYX_CXX_FLAGS} -fno-strict-aliasing " CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${LYX_CXX_FLAGS} -fno-strict-aliasing -O0 -g3 -D_DEBUG" CACHE TYPE STRING FORCE)
if(MINGW)
endif()
endforeach()
+find_package(PythonInterp 2.7 QUIET)
+if(PYTHONINTERP_FOUND)
+ if(PYTHON_VERSION_STRING VERSION_GREATER 2.8)
+ unset(PYTHONINTERP_FOUND)
+ endif()
+endif()
+
+if (NOT PYTHONINTERP_FOUND)
+ unset(PYTHON_EXECUTABLE CACHE)
+ unset(PYTHON_VERSION_MAJOR)
+ unset(PYTHON_VERSION_MINOR)
+ unset(PYTHON_VERSION_STRING)
+ find_package(PythonInterp 3.3 REQUIRED)
+endif()
+
+set(LYX_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")
+
if(LYX_NLS)
- FIND_PROGRAM(LYX_PYTHON_EXECUTABLE python2 python HINTS ${GNUWIN32_DIR}/python)
find_package(LyXGettext)
if(LYX_PYTHON_EXECUTABLE AND GETTEXT_FOUND)
add_subdirectory(po "${TOP_BINARY_DIR}/po")
message(STATUS "Boost found")
message(STATUS "Boost-libs = ${Boost_LIBRARIES}")
set(Lyx_Boost_Libraries ${Boost_LIBRARIES})
+ if (LYX_STDLIB_DEBUG)
+ # Comment from Jean-Marc Lasgouttes:
+ # In general, system boost libraries are incompatible with
+ # the use of stdlib-debug in libstdc++. See ticket #9736 for
+ # details.
+ message(WARNING "Compiling LyX with stdlib-debug and system boost libraries may lead to crashes. Consider using '-DLYX_STDLIB_DEBUG=OFF' or using '-DLYX_EXTERNAL_BOOST=OFF'")
+ endif()
else()
message(FATAL_ERROR "Boost not found" ${Boost_ERROR_REASON})
endif()