diff options
author | David Shah <dave@ds0.me> | 2020-02-04 18:38:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-04 18:38:17 +0000 |
commit | ca733561873cd54be047ae30a94efcd71b3f8be5 (patch) | |
tree | 003774ef09fa30be7e41ad8703e5c0bd320fd0a9 | |
parent | 1ceffbe0bcba4f31a40c58c436df9370899fa4a2 (diff) | |
parent | a3b74f009c577860a1c2b7f618f3c9576586a1f2 (diff) | |
download | nextpnr-ca733561873cd54be047ae30a94efcd71b3f8be5.tar.gz nextpnr-ca733561873cd54be047ae30a94efcd71b3f8be5.tar.bz2 nextpnr-ca733561873cd54be047ae30a94efcd71b3f8be5.zip |
Merge pull request #392 from se-bi/fix/ecp5/cmake-paths
Fix paths to prjtrellies project
-rw-r--r-- | .cirrus.yml | 2 | ||||
-rw-r--r-- | .cirrus/Dockerfile.ubuntu16.04 | 4 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | ecp5/family.cmake | 12 |
4 files changed, 10 insertions, 10 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index bdb3c48c..d947b559 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -5,7 +5,7 @@ task: memory: 20 dockerfile: .cirrus/Dockerfile.ubuntu16.04 - build_script: mkdir build && cd build && cmake .. -DARCH=all -DTRELLIS_ROOT=/usr/local/src/prjtrellis -DBUILD_TESTS=on && make -j $(nproc) + build_script: mkdir build && cd build && cmake .. -DARCH=all -DBUILD_TESTS=on && make -j $(nproc) submodule_script: git submodule sync --recursive && git submodule update --init --recursive test_generic_script: cd build && ./nextpnr-generic-test test_ice40_script: cd build && ./nextpnr-ice40-test diff --git a/.cirrus/Dockerfile.ubuntu16.04 b/.cirrus/Dockerfile.ubuntu16.04 index 1e540af9..d7600ded 100644 --- a/.cirrus/Dockerfile.ubuntu16.04 +++ b/.cirrus/Dockerfile.ubuntu16.04 @@ -47,8 +47,8 @@ RUN set -e -x ;\ cd /usr/local/src ;\ git clone --recursive https://github.com/SymbiFlow/prjtrellis.git ;\ cd prjtrellis ;\ - git reset --hard 46e95314be7f8850db80ad1ef6b3359b091fad93 ;\ + git reset --hard 668ce3492cbe1566c61760f06bdf676f6fb265c3 ;\ cd libtrellis ;\ - cmake -DCMAKE_INSTALL_PREFIX=/usr . ;\ + cmake . ;\ make -j $(nproc) ;\ make install @@ -100,7 +100,7 @@ For ECP5 support, you must download [Project Trellis](https://github.com/SymbiFl then follow its instructions to download the latest database and build _libtrellis_. ``` -cmake -DARCH=ecp5 -DTRELLIS_ROOT=/path/to/prjtrellis . +cmake -DARCH=ecp5 -DTRELLIS_INSTALL_PREFIX=/path/to/prjtrellis . make -j$(nproc) sudo make install ``` diff --git a/ecp5/family.cmake b/ecp5/family.cmake index 720fd19f..8756aa36 100644 --- a/ecp5/family.cmake +++ b/ecp5/family.cmake @@ -1,14 +1,14 @@ if (NOT EXTERNAL_CHIPDB) set(devices 25k 45k 85k) - if (NOT DEFINED TRELLIS_ROOT) - message(STATUS "TRELLIS_ROOT not defined using -DTRELLIS_ROOT=/path/to/prjtrellis. Default to /usr/local/share/trellis") - set(TRELLIS_ROOT "/usr/local/share/trellis") + if (NOT DEFINED TRELLIS_INSTALL_PREFIX) + message(STATUS "TRELLIS_INSTALL_PREFIX not defined using -DTRELLIS_INSTALL_PREFIX=/path-prefix/to/prjtrellis-installation. Default to /usr/local or reset by -DCMAKE_INSTALL_PREFIX when building prjtrellis/libtrellis") + set(TRELLIS_INSTALL_PREFIX "/usr/local") endif() if (NOT DEFINED PYTRELLIS_LIBDIR) find_library(PYTRELLIS pytrellis.so - PATHS ${TRELLIS_ROOT}/libtrellis + PATHS ${TRELLIS_INSTALL_PREFIX}/lib/trellis PATH_SUFFIXES trellis DOC "Location of pytrellis library") @@ -27,9 +27,9 @@ if (NOT EXTERNAL_CHIPDB) target_include_directories(ecp5_chipdb PRIVATE ${family}/) if (CMAKE_HOST_WIN32) - set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=\"${PYTRELLIS_LIBDIR}\;${TRELLIS_ROOT}/util/common\;${TRELLIS_ROOT}/timing/util\"") + set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=\"${PYTRELLIS_LIBDIR}\;${TRELLIS_INSTALL_PREFIX}/share/trellis/util/common\;${TRELLIS_INSTALL_PREFIX}/share/trellis/timing/util\"") else() - set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=${PYTRELLIS_LIBDIR}\:${TRELLIS_ROOT}/util/common:${TRELLIS_ROOT}/timing/util") + set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=${PYTRELLIS_LIBDIR}\:${TRELLIS_INSTALL_PREFIX}/share/trellis/util/common:${TRELLIS_INSTALL_PREFIX}/share/trellis/timing/util") endif() if (MSVC) |