Код: Выделить всё
CD=$PWD
PNAME=CImg
git clone --depth=1 https://github.com/GreycLab/${PNAME}.git
cd $PNAME/examples
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${CD}/${PNAME} -DCMAKE_POLICY_VERSION_MINIMUM=3.0 -DCMAKE_CXX_STANDARD=20 -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++
Код: Выделить всё
-- The C compiler identification is Clang 20.1.8
-- The CXX compiler identification is Clang 20.1.8
-- Detecting C compiler ABI info
CMake Warning:
Value of CMAKE_C_FLAGS contained a newline; truncating
CMake Warning:
Value of CMAKE_C_FLAGS contained a newline; truncating
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang
CMake Warning:
Value of CMAKE_C_FLAGS contained a newline; truncating
CMake Warning:
Value of CMAKE_C_FLAGS contained a newline; truncating
-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang - broken
CMake Error at /opt/homebrew/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/opt/homebrew/opt/llvm/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/Users/amwink/software/cpp/package/dep/CImg/examples/build/CMakeFiles/CMakeScratch/TryCompile-JYTSWH'
Run Build Command(s): /opt/homebrew/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_b3a04/fast
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_b3a04.dir/build.make CMakeFiles/cmTC_b3a04.dir/build
CMakeFiles/cmTC_b3a04.dir/flags.make:10: *** missing separator. Stop.
make: *** [cmTC_b3a04/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:45 (PROJECT)
-- Configuring incomplete, errors occurred!
CMake Warning:
Value of CMAKE_C_FLAGS contained a newline; truncating
< /code>
Предупреждение «усечение» появляется повсюду, а также показывает, когда я клонирую и пытаюсь создать «bmpmini». У меня есть ощущение, что это как -то связано с \ r Код: Выделить всё
//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=-x c -
# WARNING: Value of CMAKE_C_FLAGS contained a newline and was truncated.
# Original value:
# -x c -
# \nclang -cc1 version 17.0.0 (clang-1700.0.13.5) default target arm64-apple-darwin24.5.0
Подробнее здесь: https://stackoverflow.com/questions/797 ... -and-clang
Мобильная версия