summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:07:33 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:07:33 +0200
commit9a308f07242d6ad996afdcd07c79abfe30293c8b (patch)
tree58505e16d65e8e5802680a45d45efd19a7f105bd
parent7d898e638abad8267420f8c0d827d21f716b8977 (diff)
add my clang linux toolchain file
-rw-r--r--sdk-paths-sthalik@Clang-Linux.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/sdk-paths-sthalik@Clang-Linux.cmake b/sdk-paths-sthalik@Clang-Linux.cmake
new file mode 100644
index 00000000..0a3c71e8
--- /dev/null
+++ b/sdk-paths-sthalik@Clang-Linux.cmake
@@ -0,0 +1,31 @@
+set(opentrack_install-debug-info TRUE CACHE INTERNAL "" FORCE)
+
+add_compile_options(
+ -ferror-limit=1
+ -Weverything -Werror=implicit-function-declaration
+ -Werror
+ -Wno-c++11-compat -Wno-c++14-compat -Wno-c++98-compat-pedantic
+ -Wno-shadow -Wno-old-style-cast
+ -Wno-return-std-move-in-c++11 -Wno-exit-time-destructors -Wno-switch-enum
+ -Wno-global-constructors -Wno-missing-prototypes
+ -Wno-covered-switch-default -Wno-zero-length-array
+ -Wno-weak-vtables -Wno-weak-template-vtables
+ -Wno-padded -Wno-shadow-field -Wno-shorten-64-to-32
+ -Wno-sign-conversion
+ -Wno-extra-semi-stmt # for qt moc
+)
+
+set(base-flags "-Wall -Wextra -Wpedantic")
+set(CMAKE_C_FLAGS "-std=c11 ${base-flags} -ggdb ${CMAKE_C_FLAGS}")
+set(CMAKE_CXX_FLAGS "-std=c++17 ${base-flags} -ggdb ${CMAKE_CXX_FLAGS}")
+
+set(opt-flags "-O3 -ffast-math -march=native -flto=thin")
+
+set(CMAKE_CXX_FLAGS_RELEASE "${opt-flags} ${CMAKE_CXX_FLAGS_RELEASE}")
+set(CMAKE_C_FLAGS_RELEASE "${opt-flags} ${CMAKE_C_FLAGS_RELEASE}")
+
+set(CMAKE_CXX_FLAGS_DEBUG "-ggdb ${CMAKE_CXX_FLAGS_DEBUG}")
+set(CMAKE_C_FLAGS_DEBUG "-ggdb ${CMAKE_C_FLAGS_DEBUG}")
+
+set(CMAKE_LINKER "ld.lld")
+