set dependencies for yosys-plugins

This commit is contained in:
Kishor 2021-09-20 23:36:38 +05:30 committed by GitHub
parent 672ece2ce4
commit e94ae9ae3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 12 deletions

View File

@ -229,10 +229,10 @@ include(CheckCXXCompilerFlag)
# run makefile provided, we pass-on the options to the local make file # run makefile provided, we pass-on the options to the local make file
add_custom_target( add_custom_target(
yosys ALL OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install/bin/yosys
COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install
COMMAND $(MAKE) config-gcc COMMAND $(MAKE) config-gcc
COMMAND $(MAKE) install PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install COMMAND make clean
COMMAND $(MAKE) install -j10 PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys
COMMENT "Compile Yosys with given Makefile" COMMENT "Compile Yosys with given Makefile"
) )
@ -242,7 +242,7 @@ add_custom_target(
# yosys-plugins compilation starts # yosys-plugins compilation starts
add_custom_target( add_custom_target(
yosys-plugins ALL OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install/share/yosys/plugins/ql-qlf.so
COMMAND $(MAKE) clean YOSYS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install COMMAND $(MAKE) clean YOSYS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install
COMMAND $(MAKE) install YOSYS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install COMMAND $(MAKE) install YOSYS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys-plugins WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys-plugins
@ -250,17 +250,10 @@ add_custom_target(
COMMENT "Compile Yosys-plugins with given Makefile" COMMENT "Compile Yosys-plugins with given Makefile"
) )
add_dependencies(yosys-plugins yosys) add_dependencies(yosys-plugins DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install/share/yosys/plugins/ql-qlf.so)
# yosys-plugins compilation ends # yosys-plugins compilation ends
# run make to extract compiler options, linker options and list of source files
#add_custom_target(
# yosys
# COMMAND make run
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys
#)
# Add extra compilation flags to suppress warnings from some libraries/tools # Add extra compilation flags to suppress warnings from some libraries/tools
# Note that target_compile_options() *appends* to the current compilation options of # Note that target_compile_options() *appends* to the current compilation options of
# the specified target # the specified target