Updated cmake files

This commit is contained in:
yhirose 2020-01-24 22:54:03 -05:00
parent 29974e3c07
commit 1a40e539d1
4 changed files with 23 additions and 0 deletions

View File

@ -57,3 +57,8 @@ enable_testing()
add_subdirectory(test)
add_subdirectory(example)
add_subdirectory(lint)
find_package(LLVM CONFIG)
if(LLVM_FOUND)
add_subdirectory(pl0)
endif()

View File

@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 2.8)
project(example)
include_directories(..)
if(MSVC)

View File

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.8)
project(peglint)
include_directories(..)
add_definitions("-std=c++11")
add_executable(peglint peglint.cc)

15
pl0/CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.1)
project(tcp)
enable_language(CXX)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
include_directories(..)
add_executable(pl0 pl0.cc)
find_package(LLVM REQUIRED CONFIG)
set(add_link_deps ${add_link_deps} LLVM)
target_include_directories(pl0 PUBLIC ${LLVM_INCLUDE_DIRS})
target_link_libraries(pl0 ${add_link_deps})