Skip to content

Instantly share code, notes, and snippets.

@HariSeldon
Created August 9, 2014 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HariSeldon/d979d38cf8ee52d9d134 to your computer and use it in GitHub Desktop.
Save HariSeldon/d979d38cf8ee52d9d134 to your computer and use it in GitHub Desktop.
Root directory CMakeLists.txt
cmake_minimum_required(VERSION 2.8.8)
project("Test")
# Set compiler.
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -O0 -g -Wall")
# Find llvm.
set(LLVM_DIR "~/src/tmp/build/llvm/share/llvm/cmake/")
find_package(LLVM REQUIRED)
# Include dirs.
include_directories(${LLVM_INCLUDE_DIRS})
# Link dirs.
link_directories(${LLVM_LIBRARY_DIRS})
set(LLVM_LIBS Core)
llvm_map_components_to_libnames(REQ_LLVM_LIBS ${LLVM_LIBS})
# Definitions.
add_definitions("-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS")
# Subdir.
add_subdirectory("pass")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment