aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-10-14 13:59:37 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-10-19 16:34:34 +0200
commit6f2769cb57c06d4ee10532b80482b8610aae4f2b (patch)
tree740f81386e4d83f399e4cb1a96c429e68a5cc681 /CMakeLists.txt
parent028ad640442259ecbe7a5f8f93582f2da557426a (diff)
downloadlibnitrokey-6f2769cb57c06d4ee10532b80482b8610aae4f2b.tar.gz
libnitrokey-6f2769cb57c06d4ee10532b80482b8610aae4f2b.tar.bz2
CMake: Set clang as compiler and set linking flags
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39c0c34..803c465 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,13 @@
cmake_minimum_required(VERSION 3.5)
project(libnitrokey)
+set(CMAKE_CXX_COMPILER "/usr/bin/clang++-3.8" CACHE string "clang++ compiler" FORCE)
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-gnu-variable-sized-type-not-at-end -g3" )
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lhidapi-libusb" )
+
+include_directories(include unittest/Catch/include)
set(SOURCE_FILES
include/command.h