refactor(extra): move extra to builtin
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
5e0b344871
commit
66178ae65a
12 changed files with 31 additions and 32 deletions
|
@ -226,7 +226,7 @@ endif()
|
|||
set(CMAKE_EXE_LINKER_FLAGS_TESTCOV "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
|
||||
set(EXTRA_LIBS ${LEAN_LIBS} ${EXTRA_LIBS})
|
||||
add_subdirectory(shell)
|
||||
add_subdirectory(extra)
|
||||
add_subdirectory(builtin)
|
||||
|
||||
add_subdirectory(tests/util)
|
||||
add_subdirectory(tests/util/numerics)
|
||||
|
|
26
src/builtin/CMakeLists.txt
Normal file
26
src/builtin/CMakeLists.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
add_library(builtin builtin.cpp)
|
||||
|
||||
file(GLOB LEANLIB "${LEAN_SOURCE_DIR}/builtin/*.lean")
|
||||
FOREACH(FILE ${LEANLIB})
|
||||
get_filename_component(BASENAME ${FILE} NAME_WE)
|
||||
set(FNAME "${BASENAME}.olean")
|
||||
add_custom_command(OUTPUT ${LEAN_BINARY_DIR}/builtin/${FNAME}
|
||||
COMMAND ${LEAN_BINARY_DIR}/shell/lean -o ${LEAN_BINARY_DIR}/builtin/${FNAME} ${FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LEAN_BINARY_DIR}/builtin/${FNAME} ${LEAN_BINARY_DIR}/shell/${FNAME}
|
||||
DEPENDS ${FILE} ${LEAN_BINARY_DIR}/shell/lean)
|
||||
add_custom_target(${FNAME}_builtin DEPENDS ${LEAN_BINARY_DIR}/builtin/${FNAME})
|
||||
add_dependencies(builtin ${FNAME}_builtin)
|
||||
install(FILES ${LEAN_BINARY_DIR}/builtin/${FNAME} DESTINATION library)
|
||||
ENDFOREACH(FILE)
|
||||
|
||||
file(GLOB LEANLIB "${LEAN_SOURCE_DIR}/builtin/*.lua")
|
||||
FOREACH(FILE ${LEANLIB})
|
||||
get_filename_component(FNAME ${FILE} NAME)
|
||||
add_custom_command(OUTPUT ${LEAN_BINARY_DIR}/builtin/${FNAME}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${FILE} ${LEAN_BINARY_DIR}/builtin/${FNAME}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${FILE} ${LEAN_BINARY_DIR}/shell/${FNAME}
|
||||
DEPENDS ${FILE})
|
||||
add_custom_target("${FNAME}_builtin" DEPENDS ${LEAN_BINARY_DIR}/builtin/${FNAME})
|
||||
add_dependencies(builtin "${FNAME}_builtin")
|
||||
install(FILES ${LEAN_BINARY_DIR}/builtin/${FNAME} DESTINATION library)
|
||||
ENDFOREACH(FILE)
|
4
src/builtin/README.md
Normal file
4
src/builtin/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
Extra functionality
|
||||
-------------------
|
||||
|
||||
This directory contains Lean theories and additional Lua scripts.
|
|
@ -1,26 +0,0 @@
|
|||
add_library(extra extra.cpp)
|
||||
|
||||
file(GLOB LEANLIB "${LEAN_SOURCE_DIR}/extra/*.lean")
|
||||
FOREACH(FILE ${LEANLIB})
|
||||
get_filename_component(BASENAME ${FILE} NAME_WE)
|
||||
set(FNAME "${BASENAME}.olean")
|
||||
add_custom_command(OUTPUT ${LEAN_BINARY_DIR}/extra/${FNAME}
|
||||
COMMAND ${LEAN_BINARY_DIR}/shell/lean -o ${LEAN_BINARY_DIR}/extra/${FNAME} ${FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LEAN_BINARY_DIR}/extra/${FNAME} ${LEAN_BINARY_DIR}/shell/${FNAME}
|
||||
DEPENDS ${FILE} ${LEAN_BINARY_DIR}/shell/lean)
|
||||
add_custom_target(${FNAME}_extra DEPENDS ${LEAN_BINARY_DIR}/extra/${FNAME})
|
||||
add_dependencies(extra ${FNAME}_extra)
|
||||
install(FILES ${LEAN_BINARY_DIR}/extra/${FNAME} DESTINATION library)
|
||||
ENDFOREACH(FILE)
|
||||
|
||||
file(GLOB LEANLIB "${LEAN_SOURCE_DIR}/extra/*.lua")
|
||||
FOREACH(FILE ${LEANLIB})
|
||||
get_filename_component(FNAME ${FILE} NAME)
|
||||
add_custom_command(OUTPUT ${LEAN_BINARY_DIR}/extra/${FNAME}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${FILE} ${LEAN_BINARY_DIR}/extra/${FNAME}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${FILE} ${LEAN_BINARY_DIR}/shell/${FNAME}
|
||||
DEPENDS ${FILE})
|
||||
add_custom_target("${FNAME}_extra" DEPENDS ${LEAN_BINARY_DIR}/extra/${FNAME})
|
||||
add_dependencies(extra "${FNAME}_extra")
|
||||
install(FILES ${LEAN_BINARY_DIR}/extra/${FNAME} DESTINATION library)
|
||||
ENDFOREACH(FILE)
|
|
@ -1,5 +0,0 @@
|
|||
Extra functionality
|
||||
-------------------
|
||||
|
||||
This directory contains several Lua scripts that provide additional
|
||||
functionality to Lean.
|
Loading…
Reference in a new issue