From 08022d33fdbddc32c7034fa4c00a4c67fc8bfb64 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 27 Jan 2016 11:33:53 -0500 Subject: [PATCH] linux compatibility / fix CMakeList --- CMakeLists.txt | 21 ++++++++++++++++++--- mpw-shell-read.rl | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77fb185..b907396 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,23 @@ -set(CMAKE_CXX_COMPILER "clang++") -set(CMAKE_CXX_FLAGS "-std=c++14 -stdlib=libc++ -g -Wall -Wno-unused-const-variable -Wno-unused-variable -Wno-multichar -Wno-c++11-extensions") -project("mpw-shell") cmake_minimum_required(VERSION 2.6) +project("mpw-shell") +set (PROJECT_TYPE "CXX") +set (PROJECT_NAME "MPW Shell") + + +set(CMAKE_CXX_FLAGS "-std=c++14 -g -Wall") + +if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") + #set(CMAKE_CXX_COMPILER "clang++") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-const-variable -Wno-unused-variable -Wno-multichar -Wno-c++11-extensions") +endif() + + +if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-variable") +endif() + + add_definitions(-I ${CMAKE_SOURCE_DIR}/) diff --git a/mpw-shell-read.rl b/mpw-shell-read.rl index fe0c637..6003dde 100644 --- a/mpw-shell-read.rl +++ b/mpw-shell-read.rl @@ -2,7 +2,7 @@ #include #include - +#include %%{ machine classify;