Commit d5a579ba authored by Jaime Arias's avatar Jaime Arias
Browse files

Add CmakeLists.txt

parent 75c351a1
......@@ -41,3 +41,22 @@
*.tab.h
# End of https://www.gitignore.io/api/c++
# Created by https://www.gitignore.io/api/cmake
# Edit at https://www.gitignore.io/?templates=cmake
### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
build
# End of https://www.gitignore.io/api/cmake
# set minimum cmake version
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
# project name and language
project(pn-parser LANGUAGES CXX)
# add source folder
add_subdirectory(src)
# PN-Parser
# Build
```
mkdir build && cd build
cmake ..
make
```
# Dependencies
- `flex`
......
# set minimum cmake version
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
# project name and language
project(pn-parser-src LANGUAGES CXX)
# dependencies
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
# execute bison and flex
bison_target(rdp_parser RdPMonteur.y ${CMAKE_CURRENT_BINARY_DIR}/parser.c)
flex_target(rdp_scanner RdPMonteur.l ${CMAKE_CURRENT_BINARY_DIR}/lexer.c)
add_flex_bison_dependency(rdp_scanner rdp_parser)
# generate a the library from sources
add_library(parser
STATIC
Net.h
Net.cpp
RdPMonteur.h
${BISON_rdp_parser_OUTPUTS}
${FLEX_rdp_scanner_OUTPUTS}
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment