I have a simple program:
;/*
ppc-amigaos-gcc bitmasking.c -o bitmasking -Wall -gstabs -lauto
quit
*/
#include <proto/dos.h>
enum { // entity status flags
E_DEAD = 1,
E_ALIVE = 2,
E_SOLID = 4,
E_HIT = 8,
E_MOVED = 16
};
int main(void)
{
uint32 status;
status = E_ALIVE;
IDOS->Printf("status = 0x%08lx\n",status);
status |= E_HIT;
IDOS->Printf("status = 0x%08lx\n",status);
status |= E_MOVED;
IDOS->Printf("status = 0x%08lx\n",status);
status &= ~E_HIT;
IDOS->Printf("status = 0x%08lx\n",status);
status &= ~E_MOVED;
IDOS->Printf("status = 0x%08lx\n",status);
return 0;
}
and the CMakeLists.txt:
cmake_minimum_required(VERSION 3.24)
project(bitmasking)
set(SOURCE_FILES bitmasking.c)
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
And "cmake .." (from build drawer):
# list /build/
Directory "/build/" is empty.
#cmake ..
-- CMAKE_HOST_SYSTEM_VERSION : 53.18
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
CMake Error: Generator: execution of make failed. Make command was: /Devel/cmake/bin/cmake -E env VERBOSE=1 /SDK/C/gmake -f Makefile cmTC_e0630/fast
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /SDK/gcc/bin/gcc
CMake Error: Generator: execution of make failed. Make command was: /Devel/cmake/bin/cmake -E env VERBOSE=1 /SDK/C/gmake -f Makefile cmTC_ac067/fast
-- Check for working C compiler: /SDK/gcc/bin/gcc - broken
CMake Error at /Devel/cmake/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/SDK/gcc/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/Devel/SDK/ejemplos/SDL2/game/build/CMakeFiles/CMakeScratch/TryCompile-QXJMKS'
Run Build Command(s): /Devel/cmake/bin/cmake -E env VERBOSE=1 /SDK/C/gmake -f Makefile cmTC_ac067/fast
/SDK/C/gmake -f CMakeFiles/cmTC_14726.dir/build.make CMakeFiles/cmTC_14726.dir/build
gmake: *** [cmTC_14726/fast] Error 10
User interrupt
SIGHUP
Generator: execution of make failed. Make command was: /Devel/cmake/bin/cmake -E env VERBOSE=1 /SDK/C/gmake -f Makefile cmTC_ac067/fast
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
-- Configuring incomplete, errors occurred!
#
BTW why cmake is asking for an USR: assign?