summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-12 06:47:45 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-12 06:47:45 +0200
commitf396490f2d15d699d8299b91406a9791b38c7237 (patch)
treef6b092b79f077d885d7e9868fb9c745e161b85af
parentbfdec03aaecfa3c6d67e9a87be95e703e73a845e (diff)
parent3cebbd121ce3dc5927f9cbc8d9d665da0b2fb454 (diff)
Merge remote-tracking branch 'origin/unstable' into unstable
-rw-r--r--CMakeLists.txt5
-rw-r--r--cmake/unix.cmake19
2 files changed, 23 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c326b2ba..b483000d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,10 @@ project(opentrack)
cmake_minimum_required(VERSION 2.8.11)
cmake_policy(SET CMP0020 NEW)
if(POLICY CMP0058)
- cmake_policy(SET CMP0058 OLD)
+ cmake_policy(SET CMP0058 OLD)
+endif()
+if(POLICY CMP0028)
+ cmake_policy(SET CMP0028 OLD)
endif()
include(CMakeParseArguments)
diff --git a/cmake/unix.cmake b/cmake/unix.cmake
new file mode 100644
index 00000000..cd117bbc
--- /dev/null
+++ b/cmake/unix.cmake
@@ -0,0 +1,19 @@
+# this file only serves as toolchain file when specified so explicitly
+# when building the software. from repository's root directory:
+# mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/../cmake/mingw-w64.cmake
+# -sh 20140922
+
+SET(CMAKE_C_COMPILER cc)
+SET(CMAKE_CXX_COMPILER c++)
+
+SET(CMAKE_FIND_ROOT_PATH /usr)
+
+set(cpu "-O3 -march=native -ffast-math -g")
+set(CFLAGS-OVERRIDE "" CACHE STRING "")
+
+set(CMAKE_C_FLAGS_RELEASE "${cpu} ${CFLAGS-OVERRIDE}" CACHE STRING "" FORCE)
+set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "" FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${cpu} ${CFLAGS-OVERRIDE}" CACHE STRING "" FORCE)
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE} CACHE STRING "" FORCE)
+set(CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE} CACHE STRING "" FORCE)
+set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE)