style
This commit is contained in:
parent
5f72f006c3
commit
d5e0b54645
|
|
@ -1,8 +0,0 @@
|
|||
file(GLOB_RECURSE src_lib_antlr4 ${CMAKE_SOURCE_DIR}/3rd/antlr4-runtime/src/*.cpp)
|
||||
add_library(3rd
|
||||
${src_lib_antlr4}
|
||||
)
|
||||
|
||||
target_include_directories(3rd PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/3rd/antlr4-runtime/src
|
||||
)
|
||||
|
|
@ -1,43 +1,28 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
project(tjugo)
|
||||
project(LiteGoCompiler)
|
||||
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -O3 -g")
|
||||
|
||||
enable_testing()
|
||||
|
||||
|
||||
# library in subdirectory
|
||||
add_subdirectory(3rd)
|
||||
add_subdirectory(antlr)
|
||||
add_subdirectory(src)
|
||||
|
||||
|
||||
# excutable
|
||||
add_executable(tjugo main.cpp)
|
||||
add_executable(LiteGoCompiler main.cpp)
|
||||
|
||||
target_include_directories(tjugo
|
||||
target_include_directories(LiteGoCompiler
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
target_link_libraries(tjugo
|
||||
target_link_libraries(LiteGoCompiler
|
||||
PUBLIC
|
||||
common
|
||||
icg
|
||||
tcg
|
||||
)
|
||||
|
||||
|
||||
# install
|
||||
install(TARGETS tjugo 3rd common icg tcg
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE demo ${CMAKE_SOURCE_DIR}/demo/*)
|
||||
install(FILES ${demo}
|
||||
TYPE DOC
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
file(GLOB_RECURSE src_lib_antlr4 ${CMAKE_SOURCE_DIR}/antlr/antlr4-runtime/src/*.cpp)
|
||||
add_library(antlr
|
||||
${src_lib_antlr4}
|
||||
)
|
||||
|
||||
target_include_directories(antlr PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/antlr/antlr4-runtime/src
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue