X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=CMakeLists.txt;h=816fa80d9d2c98f1b1046852bd963873bbcab958;hb=2328f7fbdbf6ad9b1d107c026c57822fb088cc5e;hp=c88ac3b277ed90f17c811c70c546339e51dc2b4f;hpb=53b41d0284112542699289680f01c944bbb04567;p=flightgear.git diff --git a/CMakeLists.txt b/CMakeLists.txt index c88ac3b27..816fa80d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ if(COMMAND cmake_policy) if(POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif() + # Mac RPATH policy if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) endif() @@ -29,14 +30,6 @@ project(FlightGear) # We have some custom .cmake scripts not in the official distribution. set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}") -if(${CMAKE_VERSION} VERSION_GREATER 2.8.4) - # use official include provided by latest CMake - include(GNUInstallDirs) -else(${CMAKE_VERSION} VERSION_GREATER 2.8.4) - # backward compatibility: use our own module for older cmake versions - include(OldGNUInstallDirs) -endif(${CMAKE_VERSION} VERSION_GREATER 2.8.4) - # Warning when build is not an out-of-source build. string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" InSourceBuild) if(InSourceBuild) @@ -45,6 +38,7 @@ if(InSourceBuild) message(WARNING " mkdir ../fgbuild && cd ../fgbuild && cmake ${CMAKE_SOURCE_DIR}") endif(InSourceBuild) +include(GNUInstallDirs) # System detection/default settings include( DetectDistro ) include( DetectBrowser ) @@ -178,6 +172,7 @@ option(SYSTEM_GSM "Set to ON to build IAXClient with the system's GSM lib option(SYSTEM_FLITE "Set to ON to build Flightgear with the system's Flite library" ${SYSTEM_FLITE_DEFAULT}) option(SYSTEM_HTS_ENGINE "Set to ON to build Flightgear with the system's HTS Engine library" ${SYSTEM_HTS_ENGINE_DEFAULT}) option(FG_NIGHTLY "Set to ON to mark this as a nightly build" OFF) +option(ENABLE_DEV_WARNINGS "Set to ON to include developer-warnings" OFF) # additional utilities option(ENABLE_FGADMIN "Set to ON to build the FGADMIN application (default)" ON) @@ -343,11 +338,15 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set (WARNING_FLAGS_CXX "-Wall -Wno-overloaded-virtual -Wno-redeclared-class-member") + set(WARNING_FLAGS_CXX "-Wall -Wno-overloaded-virtual \ + -Wno-redeclared-class-member \ + -Wno-inconsistent-missing-override \ + -Wno-unused-local-typedef") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++") - set (WARNING_FLAGS_C "-Wall") + set(WARNING_FLAGS_C "-Wall") endif() if(WIN32)