Reformat CMakeLists.txt script for readability.
This commit is contained in:
parent
d7494702af
commit
8554bda556
|
@ -64,16 +64,23 @@ elseif(BISON_VERSION VERSION_LESS 3.0)
|
||||||
message("== Bison 2.5 was found. You have to apply cmake/bison2.patch...")
|
message("== Bison 2.5 was found. You have to apply cmake/bison2.patch...")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## 3. Boost components
|
## 3. External components
|
||||||
|
|
||||||
find_package(Boost 1.54 REQUIRED)
|
find_package(Boost 1.54 REQUIRED)
|
||||||
|
|
||||||
|
add_definitions(
|
||||||
|
${Boost_DEFINITIONS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
${Boost_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
## 4. Build
|
## 4. Build
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${Boost_INCLUDE_DIRS}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_definitions(-Wall -Wno-deprecated-register -std=c++0x -DYYDEBUG=0 -O2)
|
add_definitions(-Wall -Wno-deprecated-register -std=c++0x -DYYDEBUG=0 -O2)
|
||||||
|
@ -82,12 +89,13 @@ bison_target(Parser Monicelli.ypp ${CMAKE_CURRENT_BINARY_DIR}/Parser.cpp)
|
||||||
flex_target(Scanner Monicelli.lpp ${CMAKE_CURRENT_BINARY_DIR}/Lexer.cpp)
|
flex_target(Scanner Monicelli.lpp ${CMAKE_CURRENT_BINARY_DIR}/Lexer.cpp)
|
||||||
add_flex_bison_dependency(Scanner Parser)
|
add_flex_bison_dependency(Scanner Parser)
|
||||||
|
|
||||||
add_executable(
|
add_executable(mcc
|
||||||
mcc
|
|
||||||
main.cpp
|
main.cpp
|
||||||
${BISON_Parser_OUTPUTS} ${FLEX_Scanner_OUTPUTS}
|
${BISON_Parser_OUTPUTS} ${FLEX_Scanner_OUTPUTS}
|
||||||
CppEmitter.cpp
|
CppEmitter.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(mcc ${Boost_LIBRARIES})
|
target_link_libraries(mcc
|
||||||
|
${Boost_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user