Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use cmakefiles with FetchContent (external) mechanism. #13

Open
bsergean opened this issue May 22, 2024 · 0 comments
Open

Cannot use cmakefiles with FetchContent (external) mechanism. #13

bsergean opened this issue May 22, 2024 · 0 comments

Comments

@bsergean
Copy link

https://cmakebyexample.dev/use-library-fetchcontent/

I'm trying to consume this library like this, but I'm getting some cmake errors. I think most of them should be simple to fix, like using CMAKE_CURRENT_DIR or something like that in some path.

If I set the config to auto I get

-- The Fortran compiler identification is GNU 11.4.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- automatic configuration requested
CMake Error at /home/benjamin.sergeant/projects/xxx/build/temp/CMakeFiles/CMakeTmp/CMakeLists.txt:22 (target_sources):
  Cannot find source file:

    /home/benjamin.sergeant/projects/xxx/build/detect/config/config_detect.c


CMake Error at /home/benjamin.sergeant/projects/xxx/build/temp/CMakeFiles/CMakeTmp/CMakeLists.txt:21 (add_executable):
  No SOURCES given to target: cmTC_8e5d3


CMake Error at build/_deps/blis-src/CMakeLists.txt:68 (try_run):
  Failed to generate test project build system.


-- Configuring incomplete, errors occurred!

If I set the config to zen, I get a new error

-- CPM: adding package [email protected] (10.0.0)
-- CPM: adding package [email protected] (4.2)
/usr/bin/python3.10: can't open file '/home/benjamin.sergeant/projects/xxx/build/cmake/read_registry.py': [Errno 2] No such file or directory
-- configuration 'zen' is registered.
CMake Error at build/_deps/blis-src/CMakeLists.txt:102 (list):
  list GET given empty list


CMake Error at build/_deps/blis-src/CMakeLists.txt:103 (list):
  list GET given empty list


CMake Error at build/_deps/blis-src/CMakeLists.txt:104 (list):
  list GET given empty list

I'm actually using something called 'CPM' which is a wrapper around FetchContnt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant