xmos / xmath_walkthrough

A tutorial on different approaches to high performance FIR and FFT using xcore.ai
Other
2 stars 2 forks source link

macOS cmake can't find the xs3a.cmake file #3

Closed QuinnWang closed 1 year ago

QuinnWang commented 1 year ago

macOS 10.14.6 Although confirmed the xmos_cmake_toolchain/xs3a.cmake in the correct directory, but the cmake reported can't find the xs3a.cmake file.

bash-3.2$ cmake -B build -S xmath_walkthrough -DCMAKE_TOOLCHAIN_FILE=xmos_cmake_toolchain/xs3a.cmake -G"Unix Makefiles"
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.23/Modules/CMakeDetermineSystem.cmake:130 (message):
  Could not find toolchain file: xmos_cmake_toolchain/xs3a.cmake
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
bash-3.2$ ls
build           xmath_walkthrough   xmos_cmake_toolchain
bash-3.2$ ls xmos_cmake_toolchain/
README.md       xs2a.cmake
xc_override.cmake   xs3a.cmake
bash-3.2$ 

After change the CMAKE_TOOLCHAIN_FILE from "xmos_cmake_toolchain/xs3a.cmake" to "../xmos_cmake_toolchain/xs3a.cmake", it works: cmake -B build -S xmath_walkthrough -DCMAKE_TOOLCHAIN_FILE=../xmos_cmake_toolchain/xs3a.cmake -G"Unix Makefiles"