Skip to content

Commit b006384

Browse files
committed
yosys update v42 + f4pga test off
1 parent ed9c4c8 commit b006384

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

yosys/CMakeLists.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project("yosys")
4+
5+
# Create a target out of the library compilation result
6+
#SET(BINARY_LIB_FILE1 ${CMAKE_CURRENT_BINARY_DIR}/yosys1)
7+
#SET(BINARY_LIB_FILE2 ${CMAKE_CURRENT_BINARY_DIR}/yosys2)
8+
#SET(YOSYS_EXEC ${CMAKE_CURRENT_SOURCE_DIR}/yosys)
9+
#SET(BINARY_EXEC_FILE ${CMAKE_CURRENT_BINARY_DIR}/yosys)
10+
#SET(YOSYS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
11+
12+
set(CURRENT_CPPFLAGS "$(CPPFLAGS)-w")
13+
if(${CMAKE_GENERATOR} STREQUAL "Ninja")
14+
set(CURRENT_CPPFLAGS "-w")
15+
endif()
16+
17+
# how to build the result of the library
18+
add_custom_command(OUTPUT yosys-bin
19+
COMMAND ${MAKE_PROGRAM} ENABLE_ABC=0
20+
# -C ${CMAKE_CURRENT_BINARY_DIR}
21+
# -f ${CMAKE_CURRENT_SOURCE_DIR}/Makefile #(out-of-tree) build directory
22+
PREFIX=${CMAKE_BINARY_DIR}
23+
# -j${CUSTOM_BUILD_PARALLEL_LEVEL}
24+
> /dev/null
25+
26+
COMMAND ${MAKE_PROGRAM} install ENABLE_ABC=0
27+
# -C ${CMAKE_CURRENT_BINARY_DIR}
28+
# -f ${CMAKE_CURRENT_SOURCE_DIR}/Makefile #(out-of-tree) build directory
29+
PREFIX=${CMAKE_BINARY_DIR}
30+
> /dev/null
31+
32+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
33+
34+
add_custom_target(yosys ALL DEPENDS yosys-bin)
35+
36+
# create a target out of the library compilation result
37+
#add_custom_target(yosys-qwerty ALL DEPENDS ${BINARY_LIB_FILE1})
38+
39+
# specify where the library is and where to find the headers
40+
#set_target_properties(yosys-qwerty
41+
# PROPERTIES PREFIX "" #Avoid extra 'lib' prefix
42+
# IMPORTED_LOCATION ${BINARY_LIB_FILE1}
43+
# INTERFACE_INCLUDE_DIRECTORIES ${YOSYS_INCLUDE_DIRS})
44+
45+
46+
#install(FILES ${BINARY_LIB_FILE1} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

0 commit comments

Comments
 (0)