From d863088986097e4d1cb286947225d9dd0e040615 Mon Sep 17 00:00:00 2001 From: Benjamin Piwowarski Date: Tue, 22 Apr 2014 09:36:17 +0200 Subject: [PATCH] Revert "Objective-C compililation support with cmake and C++11" This reverts commit c2e67a41ce4b3b281f6c8a805be5e821ce0aea0a. --- CMakeLists.txt | 7 +++---- boost/CMakeLists.txt | 1 - src/CMakeLists.txt | 6 +----- src/support/CMakeLists.txt | 1 - src/support/tests/CMakeLists.txt | 2 -- 5 files changed, 4 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03b957d6a8..51b67fb69c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,8 +204,7 @@ else() endif() -# Variable that hold the flags that should only be used with C++ files -set(LYX_CXX_SPECIFIC_FLAGS) +set(LYX_GCC11_MODE) if(UNIX OR MINGW) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) message(STATUS "Using GCC version ${GCC_VERSION}") @@ -220,7 +219,7 @@ if(UNIX OR MINGW) if(NOT CXX11COMPILER_FOUND) message(FATAL_ERROR "A C++11 compatible compiler is required.") endif() - set(LYX_CXX_SPECIFIC_FLAGS "${LYX_CXX_SPECIFIC_FLAGS} ${CXX11_FLAG}") + set(LYX_GCC11_MODE "${CXX11_FLAG}") endif() else() if(MSVC10) @@ -484,7 +483,7 @@ if(NOT MSVC) if(NOT LYX_QUIET) set(CMAKE_VERBOSE_MAKEFILE ON) endif() - set(LYX_CXX_FLAGS "-Wall -Wunused-parameter") + set(LYX_CXX_FLAGS "-Wall -Wunused-parameter ${LYX_GCC11_MODE}") if(LYX_STDLIB_DEBUG) set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC") endif() diff --git a/boost/CMakeLists.txt b/boost/CMakeLists.txt index 8dcb2750d7..6d7839a713 100644 --- a/boost/CMakeLists.txt +++ b/boost/CMakeLists.txt @@ -4,6 +4,5 @@ # Copyright (c) 2006-2011 Peter Kümmel, # -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LYX_CXX_SPECIFIC_FLAGS}") add_subdirectory(libs) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6b1b5049b2..526f37a556 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,15 +11,11 @@ include_directories(${TOP_SRC_DIR}/src) set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets") -# support is the only directory containing objective-c files... -add_subdirectory(support) -# ...so we can add all the c++ specific flags after -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LYX_CXX_SPECIFIC_FLAGS}") - add_subdirectory(frontends) add_subdirectory(graphics) add_subdirectory(insets) add_subdirectory(mathed) +add_subdirectory(support) add_subdirectory(tex2lyx) if (UNIX) add_subdirectory(client) diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt index b0916b51f9..f979420dc7 100644 --- a/src/support/CMakeLists.txt +++ b/src/support/CMakeLists.txt @@ -22,7 +22,6 @@ file(GLOB support_mythes_headers ${TOP_SRC_DIR}/src/support/mythes/*.hxx) file(GLOB support_linkback_sources ${TOP_SRC_DIR}/src/support/linkback/*.m*) file(GLOB support_linkback_headers ${TOP_SRC_DIR}/src/support/linkback/*.h) -set_source_files_properties(${support_sources} ${support_mythes_sources} PROPERTIES COMPILE_FLAGS "${LYX_CXX_SPECIFIC_FLAGS}") list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/os_win32.cpp ${TOP_SRC_DIR}/src/support/os_unix.cpp diff --git a/src/support/tests/CMakeLists.txt b/src/support/tests/CMakeLists.txt index 7c4600f170..eac5aa79f2 100644 --- a/src/support/tests/CMakeLists.txt +++ b/src/support/tests/CMakeLists.txt @@ -6,8 +6,6 @@ project(supporttest) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LYX_CXX_SPECIFIC_FLAGS}") - macro(sources _program) set(_tmplist) foreach(_tmp ${ARGN})