Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,15 @@
*.out
*.app

build/
.idea/
# CMake
CMakeCache.txt
CMakeFiles/
CTestTestfile.cmake
Makefile
Testing/
cmake_install.cmake
compile_commands.json
install_manifest.txt

# Beaker
config.hpp
35 changes: 12 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
# Copyright (c) 2015 Andrew Sutton
# All rights reserved

# Project configuration
cmake_minimum_required(VERSION 3.1)

# Project configuration
project(beaker VERSION 0.0 LANGUAGES C CXX)
enable_testing()

foreach(component MAJOR MINOR PATCH TWEAK)
if(PROJECT_VERSION_${component} STREQUAL "")
set(PROJECT_VERSION_${component} 0)
endif()
endforeach()

set(BEAKER_PACKAGE_NAME ${PROJECT_NAME})
set(BEAKER_PACKAGE_TARNAME ${BEAKER_PACKAGE_NAME})
set(BEAKER_PACKAGE_VERSION ${PROJECT_VERSION})
set(BEAKER_PACKAGE_STRING "${BEAKER_PACKAGE_NAME} ${BEAKER_PACKAGE_VERSION}")
set(BEAKER_PACKAGE_BUGREPORT "https://github.com/asutton/beaker/issues")
set(BEAKER_PACKAGE_URL "https://github.com/asutton/beaker")

set(BEAKER_VERSION ${PROJECT_VERSION})
set(BEAKER_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(BEAKER_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(BEAKER_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(BEAKER_VERSION_TWEAK ${PROJECT_VERSION_TWEAK})
set(PACKAGE_NAME ${PROJECT_NAME})
set(PACKAGE_TARNAME ${PACKAGE_NAME})
set(PACKAGE_VERSION ${PROJECT_VERSION})
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/asutton/beaker/issues")
set(PACKAGE_URL "https://github.com/asutton/beaker")

# Boost dependencies
find_package(Boost 1.55.0 REQUIRED COMPONENTS system filesystem program_options)
Expand All @@ -49,14 +38,14 @@ find_program(LLVM_IR_COMPILER llc HINTS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH
#
# TODO: Actually use the low-level tools and link
# only against the minimal Beaker runtime.
set(BEAKER_NATIVE_COMPILER ${CMAKE_C_COMPILER})
set(BEAKER_NATIVE_ARCHIVER ${CMAKE_AR})
set(NATIVE_COMPILER ${CMAKE_C_COMPILER})
set(NATIVE_ARCHIVER ${CMAKE_AR})

# Compiler configuration
set(CMAKE_CXX_FLAGS "-Wall -std=c++1y")

# TODO: Remove when 'lingo' submodule is updated.
include_directories(lingo)
# Generate the configuration header.
configure_file(config.hpp.in config.hpp)

if(NOT TARGET check)
add_custom_target(check COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target test)
Expand Down
3 changes: 0 additions & 3 deletions beaker/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Copyright (c) 2015 Andrew Sutton
# All rights reserved

# Generate the configuration header.
configure_file(config.hpp.in config.hpp)

# Add the core Beaker library.
add_library(beaker
file.cpp
Expand Down
6 changes: 4 additions & 2 deletions beaker/compiler.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2015 Andrew Sutton
// All rights reserved

#include "config.hpp"

#include "beaker/options.hpp"
#include "beaker/job.hpp"
#include "beaker/lexer.hpp"
Expand Down Expand Up @@ -104,7 +106,7 @@ compiler_main(int argc, char* argv[])
.run(),
vm);
po::notify(vm);
} catch(std::exception& err) {
} catch (std::exception& err) {
std::cerr << "error: " << err.what() << "\n\n";
usage(std::cerr, all_opts);
return -1;
Expand All @@ -116,7 +118,7 @@ compiler_main(int argc, char* argv[])
return 0;
}
if (vm["version"].as<bool>()) {
std::cout << BEAKER_PACKAGE_STRING << '\n';
std::cout << PACKAGE_STRING << '\n';
return 0;
}

Expand Down
125 changes: 0 additions & 125 deletions beaker/config.hpp.in

This file was deleted.

Loading