summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-22 13:31:56 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-23 00:05:15 +0200
commita643a92efb9dacec0442152c77b9a57bb7590ece (patch)
tree9ebdda7eba91e49d2ab935bd12df467a17e73805
parent8a80cba8c336eb39a69aadde8d2c44b8f9c54026 (diff)
cmake: go back to c++11
We don't use c++14 features yet, and GNU 5.3.0 has missing make_unique anyway.
-rw-r--r--cmake/apple.cmake4
-rw-r--r--cmake/linux.cmake4
-rw-r--r--cmake/mingw-w64.cmake8
-rw-r--r--cmake/opentrack-platform.cmake3
-rw-r--r--proto-wine/CMakeLists.txt5
5 files changed, 12 insertions, 12 deletions
diff --git a/cmake/apple.cmake b/cmake/apple.cmake
index 2a4b49d0..d3cc41eb 100644
--- a/cmake/apple.cmake
+++ b/cmake/apple.cmake
@@ -1,12 +1,12 @@
set(CMAKE_BUILD_TYPE_INIT RELEASE)
-set(CMAKE_CXX_FLAGS "-arch x86_64 -std=c++14 -stdlib=libc++" CACHE STRING "" FORCE)
+set(CMAKE_CXX_FLAGS "-arch x86_64 -std=c++11 -stdlib=libc++" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS "-arch x86_64" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-ffast-math -O3 -flto -fvisibility=hidden -g" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE " ${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "" FORCE)
-set(cmake-link-common "-stdlib=libc++ -std=c++14 -arch x86_64")
+set(cmake-link-common "-stdlib=libc++ -std=c++11 -arch x86_64")
set(CMAKE_EXE_LINKER_FLAGS "${cmake-link-common} -Wl,-stack_size,0x4000000" CACHE STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS ${cmake-link-common} CACHE STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS ${cmake-link-common} CACHE STRING "" FORCE)
diff --git a/cmake/linux.cmake b/cmake/linux.cmake
index 520db1a9..a1083db5 100644
--- a/cmake/linux.cmake
+++ b/cmake/linux.cmake
@@ -1,6 +1,6 @@
set(CMAKE_BUILD_TYPE_INIT RELEASE)
-set(CMAKE_CXX_FLAGS "-std=c++14 -fPIC" CACHE STRING "" FORCE)
+set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS "-fPIC" CACHE STRING "" FORCE)
set(CMAKE_AR "gcc-ar" CACHE STRING "" FORCE)
@@ -10,7 +10,7 @@ set(CMAKE_RANLIB "gcc-ranlib" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-ffast-math -O3 -flto -fuse-linker-plugin -fvisibility=hidden -fPIC" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE " ${CMAKE_C_FLAGS_RELEASE} " CACHE STRING "" FORCE)
-set(cmake-link-common "-std=c++14")
+set(cmake-link-common "-std=c++11")
set(CMAKE_EXE_LINKER_FLAGS "${cmake-link-common}" CACHE STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS ${cmake-link-common} CACHE STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS ${cmake-link-common} CACHE STRING "" FORCE)
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake
index f951f93e..96669e2a 100644
--- a/cmake/mingw-w64.cmake
+++ b/cmake/mingw-w64.cmake
@@ -36,14 +36,14 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# oldest CPU supported here is Northwood-based Pentium 4. -sh 20150811
-set(fpu "-ffast-math -mfpmath=both -mstackrealign -ftree-vectorize -falign-functions=16 -falign-loops=16")
-set(cpu "-O3 -pipe -march=pentium4 -mtune=corei7-avx -msse -msse2 -mno-sse3 -mno-avx -frename-registers -fno-PIC")
+set(fpu "-ffast-math -mfpmath=both -mstackrealign -falign-functions=16 -falign-loops=16")
+set(cpu "-O3 -march=pentium4 -mtune=corei7-avx -msse -msse2 -mno-sse3 -mno-avx -frename-registers")
set(lto "-flto -fuse-linker-plugin -flto-compression-level=9 -flto-partition=none -fipa-icf -fipa-pta -flto-odr-type-merging")
set(bloat "-fno-exceptions -fno-rtti")
set(sections "-ffunction-sections -fdata-sections")
-set(_CFLAGS "-fvisibility=hidden")
-set(_CXXFLAGS "${bloat} ${_CFLAGS} -std=c++14")
+set(_CFLAGS "-fvisibility=hidden -pipe")
+set(_CXXFLAGS "${bloat} ${_CFLAGS} -std=c++11")
set(_CFLAGS_RELEASE "-s ${cpu} ${fpu} ${lto} ${sections}")
set(_CFLAGS_DEBUG "-g -O0 -fstack-protector-strong")
set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE}")
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index ab11a780..0cb596a2 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -31,7 +31,6 @@ set(CMAKE_AUTOMOC OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include_directories(${CMAKE_SOURCE_DIR})
-#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# note, hatire supports both ftnoir and opentrack
# don't remove without being sure as hell -sh 20140922
@@ -54,7 +53,7 @@ if(APPLE)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR APPLE)
- set(CMAKE_CXX_FLAGS " -std=c++14 ${CMAKE_CXX_FLAGS} ")
+ set(CMAKE_CXX_FLAGS " -std=c++11 ${CMAKE_CXX_FLAGS} ")
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
diff --git a/proto-wine/CMakeLists.txt b/proto-wine/CMakeLists.txt
index 01034e30..f949d1ad 100644
--- a/proto-wine/CMakeLists.txt
+++ b/proto-wine/CMakeLists.txt
@@ -3,7 +3,7 @@ if(NOT WIN32)
set(SDK_WINE_NO_WRAPPER FALSE CACHE BOOL "disable Wine wrapper -- use Wine only for X-Plane")
if(SDK_WINE_PREFIX)
opentrack_boilerplate(opentrack-proto-wine)
- target_link_libraries(opentrack-proto-wine opentrack-compat opentrack-csv)
+ opentrack_link(opentrack-proto-wine opentrack-compat opentrack-csv)
if(NOT SDK_WINE_NO_WRAPPER)
set(my-rt -lrt)
if(APPLE)
@@ -14,7 +14,7 @@ if(NOT WIN32)
add_custom_command(
OUTPUT opentrack-wrapper-wine.exe.so
DEPENDS ${wine-deps}
- COMMAND ${SDK_WINE_PREFIX}/bin/wineg++ -g -DNOMINMAX -O2 -m32 -std=c++14 -o
+ COMMAND ${SDK_WINE_PREFIX}/bin/wineg++ -g -DNOMINMAX -O2 -m32 -std=c++11 -o
opentrack-wrapper-wine.exe -I "${CMAKE_SOURCE_DIR}" -I "${CMAKE_BINARY_DIR}"
${wine-deps}
${my-rt})
@@ -24,4 +24,5 @@ if(NOT WIN32)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/opentrack-wrapper-wine.exe.so" DESTINATION ${opentrack-hier-pfx})
endif()
endif()
+ opentrack_register(opentrack-proto-wine)
endif()