summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-01-06 09:17:43 +0100
committerMatthias Braun <matze@braunis.de>2016-01-06 09:33:12 +0100
commit868a321b93f2298aeaba2035d1e61912a06f8d7c (patch)
treeb97b277386486699f1074934d393cd204fafac96 /CMakeLists.txt
parentf2358bea83387c3519514ee8cc0c2c899d8b054e (diff)
CMakeLists: Add HOST_TRIPLE config to be in line with Makefile
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dac27b0..b4cc367 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,10 +82,14 @@ endif()
set(SYSTEM_INCLUDE_DIR ${DEFAULT_SYSTEM_INCLUDE_DIR} CACHE PATH "system include directory")
set(LOCAL_INCLUDE_DIR /usr/local CACHE PATH "system local include directory")
set(COMPILER_INCLUDE_DIR lib/cparser/${cparser_VERSION} CACHE STRING "compiler include dir (under CMAKE_INSTALL_PREFIX)")
+set(HOST_TRIPLE CACHE STRING "host machine triple (may be empty)")
add_definitions(-DSYSTEM_INCLUDE_DIR=\"${SYSTEM_INCLUDE_DIR}\")
add_definitions(-DLOCAL_INCLUDE_DIR=\"${LOCAL_INCLUDE_DIR}\")
add_definitions(-DCOMPILER_INCLUDE_DIR=\"${CMAKE_INSTALL_PREFIX}/${COMPILER_INCLUDE_DIR}\")
+if(HOST_TRIPLE)
+ add_definitions(-DHOST_TRIPLE=\"${HOST_TRIPLE}\")
+endif()
# Produce revision.h
include_directories(${CMAKE_CURRENT_BINARY_DIR})