summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-05-15 12:30:53 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-05-15 12:30:53 +0200
commit9d3364232e2633146e419fe79be2ea99fb1d9c47 (patch)
tree0e1f87553f002074f54eda89a252b70d5e962931 /cmake
parent7ed453de4a77266e7e29f2f944b285b4fe3b248b (diff)
cmake: linux toolchain file
For my convenience.
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/linux.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/linux.cmake b/cmake/linux.cmake
new file mode 100755
index 00000000..8145d2d8
--- /dev/null
+++ b/cmake/linux.cmake
@@ -0,0 +1,22 @@
+set(CMAKE_BUILD_TYPE_INIT RELEASE)
+
+set(CMAKE_CXX_FLAGS "-std=c++11" CACHE STRING "" FORCE)
+set(CMAKE_C_FLAGS "" CACHE STRING "" FORCE)
+
+set(CMAKE_AR "gcc-ar" CACHE STRING "" FORCE)
+set(CMAKE_NM "gcc-nm" CACHE STRING "" FORCE)
+set(CMAKE_RANLIB "gcc-ranlib" CACHE STRING "" FORCE)
+
+set(CMAKE_C_FLAGS_RELEASE "-ffast-math -O3 -flto -fuse-linker-plugin -fvisibility=hidden" CACHE STRING "" FORCE)
+set(CMAKE_CXX_FLAGS_RELEASE " ${CMAKE_C_FLAGS_RELEASE} -fvisibility-inlines-hidden " CACHE STRING "" FORCE)
+
+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)
+
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-flto -fuse-linker-plugin" CACHE STRING "" FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE} CACHE STRING "" FORCE)
+set(CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE} CACHE STRING "" FORCE)
+
+set(OpenCV_DIR ~/dev/opentrack-depends/opencv/build)