Open cullvox opened 5 months ago
@cullvox
.gitignore
, because:
clangd
is your option, so it should be ignored with your own $XDG_CONFIG_HOME/git/ignore
instead of project onebuild
is not necessarily specified as build directory by cmake
CMakeLists.txt
CMakeLists.txt
example here of how it would be used from CPM when this CMakeLists.txt
will be added? I don't use cmake usually, so I can't imagine how it will be.cmake_minimum_required(VERSION 3.14)
project(qoixx_sample LANGUAGES CXX)
include(CMake/CPM.cmake) # CPM module
CPMAddPackage("gh:wx257osn2/qoixx@0.1.7")
add_executable(qoixx_sample "main.cpp")
target_link_libraries(qoixx_sample PUBLIC qoixx::qoixx)
Here's an example CMake for this.
@cullvox Sorry to late for reply, I tried to check the behavior. It seems that it works well for CPM (without above issue), but when we build qoixx with CMake, 3 binaries (qoibench
, qoiconv
, and qoitest
) are generated on the build directory. Currently Makefile
generates binaries on bin/
directory, so we can copy it to our own $PATH
, but it is hard to understand to what binaries to copy to where with current CMakeLists.txt
. Would you support installing (make install
) for qoiconv
and qoibench
? (qoitest
is not needed to support this)
@wx257osn2 Hi, I'm providing a late reply too. I added an install for the qoiconv
and qoibench
targets. I tested this on Windows and Ubuntu. Using cmake --install {build folder}
will install the files to the bin
folder, or you could go into the CMake build folder and call make install
and it works the same way. I think this is what you were asking for — if not I'll gladly add/change anything!
@cullvox Thank you for working it!
CMAKE_INSTALL_PREFIX
to behave correctly?
cmake --install {build folder}
without CMAKE_INSTALL_PREFIX
may install them into /usr/local
(on Linux environment) or something like that IMOinstall
target in Makefile
to refer (sorry), but I want CMake version similar to PREFIX=/path/to make install
.Yikes, I'd missed to send review comment (it was "pending" status... (◞‸◟) ). I sent it, so please fix above comment.
I'd believed that I'd already sent it :sob:
In one of my projects I'm working on it's useful to have support for CMake. I am using CPM, and to easily add a small library like this I think it might be useful to have some CMake support. What I added is just an interface library for the header and also compiling the test cases.
Usage of the overload template helper in the conversion test, was causing a compiler error when using AppleClang.