gc
gc copied to clipboard
CMake config file
CMake configure file ready.
I don't know how to do that. Can you continue the work?
@ssrlive commented on the current CMake support status in #48; I am moving this here since there is no official CMake support in gc
and any existing issues w/ CMake support are related to this PR.
Here is the comment:
test it on Windows / Linux / macOS, all the Release buildings are failed.
ssrlive@ss:~/Desktop/gc/build$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
project(gc C)
set(CMAKE_C_STANDARD 11)
include_directories(src)
include_directories(test)
add_executable(gc
src/gc.h
src/log.c
src/log.h
test/minunit.h
test/test_gc.c)
ssrlive@ss:~/Desktop/gc/build$ cmake .. -DCMAKE_BUILD_TYPE=Release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ssrlive/Desktop/gc/build
ssrlive@ss:~/Desktop/gc/build$ make
[100%] Built target gc
ssrlive@ss:~/Desktop/gc/build$ ./gc
---=[ GC tests
Heap allocation referenced from stack should be tagged
Tests run: 5
Also @ssrlive , I can't provide CMake support. The GNU make solution works fine. I am happy to merge a working CMakeList.txt
, but as I mentioned earlier, I will require it to support build, text and coverage runs in order to accept the PR.
If that continues to be an issue for you, I am also happy to open a ticket that asks for CMake support and to tag it with a help-wanted tag.
Couldn't you provide this CMakeLists.txt besides the regular Makefile? There's no harm in having both, even though CMake can generate a Makefile, you usually don't do this within the project directory.
Having CMake support would make it much easier to integrate gc into other projects e.g. using git submodules.
@mupfdev, misunderstanding: as mentioned in the previous comment I'd be happy to merge a CMakeLists.txt
to this project but it would need to have feature parity with the existing Makefile
.