Anyone successfully compiled libdispatch required by modern GNUStep?
Posted: Thu Jul 17, 2025 10:12 pm
I tried following these steps to build GNUStep: https://www.gnustep.org/getit.html. GNUStep has a dependency on https://github.com/swiftlang/swift-corelibs-libdispatch and it checks out that repo as part of its build. Unfortunately it fails to build it. I tried building that library independently using both its own instructions and those supplied by GNUstep here: http://developer.gnustep.org/Guides/Set ... linux.html. Unfortunately, I can't even get the initial cmake step to work
.
The above lines give this output:
I can't figure out why there is an error Unknown CMake command "check_c_compiler_flag" when I can see this line in the CMakeLists.txt file:
Has anyone successfully built swift-corelibs-libdispatch?

git clone --branch main https://github.com/apple/swift-corelibs-libdispatch
cd swift-corelibs-libdispatch/
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ src
The above lines give this output:
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is Clang 20.1.2
-- The CXX compiler identification is Clang 20.1.2
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:143 (check_c_compiler_flag):
Unknown CMake command "check_c_compiler_flag".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.31)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
I can't figure out why there is an error Unknown CMake command "check_c_compiler_flag" when I can see this line in the CMakeLists.txt file:
include(CheckCCompilerFlag)
Has anyone successfully built swift-corelibs-libdispatch?