@@ -79,33 +79,32 @@ if (${WITH_PARMYS})
79
79
# Synlig integration (manages Surelog and UHDM internally)
80
80
81
81
# Synlig integration (manages Surelog and UHDM internally)
82
- set (SYNLIG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /synlig)
82
+ set (SYNLIG_PREFIX_DIR "${CMAKE_BINARY_DIR} /synlig" ) # Ensure paths are correct
83
+ set (SYNLIG_SOURCE_DIR "${SYNLIG_PREFIX_DIR} /src/synlig" ) # Adjust source dir to match ExternalProject behavior
83
84
84
85
# Clone Synlig repository and ensure submodules are synced before building
85
86
ExternalProject_Add(synlig
86
- PREFIX "synlig"
87
+ PREFIX ${SYNLIG_PREFIX_DIR}
87
88
88
89
# Clone the Synlig repository
89
90
GIT_REPOSITORY https://github.com/chipsalliance/synlig.git
90
91
GIT_TAG main
91
92
GIT_PROGRESS TRUE
92
93
GIT_SHALLOW TRUE
93
-
94
- # Set source and build directories
94
+
95
+ # Set the correct source directory
95
96
SOURCE_DIR "${SYNLIG_SOURCE_DIR} "
96
97
BUILD_IN_SOURCE FALSE
97
- INSTALL_DIR " "
98
-
99
- # Sync submodules after cloning
100
-
101
-
102
- UPDATE_COMMAND git submodule update --init --recursive third_party/surelog
103
- WORKING_DIRECTORY ${SYNLIG_SOURCE_DIR}
104
-
105
- BUILD_COMMAND ${MAKE_PROGRAM} -C ${SYNLIG_SOURCE_DIR} install DESTDIR=${CMAKE_BINARY_DIR} /bin/synlig_install -j${PROCESSOR_COUNT}
98
+ INSTALL_DIR "${CMAKE_BINARY_DIR} /synlig_install"
99
+
100
+ # Disable submodule update command (not needed, since it's included in cloning)
101
+ UPDATE_COMMAND ""
102
+
103
+ # Ensure build directory exists before building
104
+ BUILD_COMMAND ${MAKE_PROGRAM} -C ${SYNLIG_SOURCE_DIR} install DESTDIR=${CMAKE_BINARY_DIR} /synlig_install -j${PROCESSOR_COUNT}
106
105
INSTALL_COMMAND ""
107
106
CONFIGURE_COMMAND ""
108
-
107
+
109
108
# Pass necessary paths and set environment variables
110
109
CMAKE_CACHE_ARGS
111
110
"-DCMAKE_BUILD_TYPE:STRING=Release"
@@ -114,15 +113,15 @@ if (${WITH_PARMYS})
114
113
"-DUHDM_INSTALL_DIR=${CMAKE_BINARY_DIR} "
115
114
"-DBUILD_DIR=${CMAKE_BINARY_DIR} /synlig-build"
116
115
"-DEXPORT_PATH=${CMAKE_BINARY_DIR} /synlig_install/usr/local/bin:$ENV{PATH} "
117
-
116
+
118
117
LOG_BUILD ON
119
118
LOG_UPDATE ON
120
119
LOG_INSTALL ON
121
120
LOG_CONFIGURE OFF
122
121
LOG_OUTPUT_ON_FAILURE ON
123
-
122
+
124
123
# Ensure dependencies like Yosys are built first
125
- DEPENDS yosys # Ensure submodule sync runs before synlig build
124
+ DEPENDS yosys
126
125
)
127
126
128
127
endif ()
@@ -175,4 +174,4 @@ if (VPR_USE_SERVER)
175
174
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /sockpp/include >
176
175
$<INSTALL_INTERFACE:include >
177
176
)
178
- endif ()
177
+ endif ()
0 commit comments