Compare commits
No commits in common. "a7e6d1d8de7fd3815e3fba1925fb8980340055ca" and "0f02486d79010d7ae3859aa2820540daeee5965f" have entirely different histories.
a7e6d1d8de
...
0f02486d79
7 changed files with 25 additions and 9 deletions
|
@ -4,12 +4,20 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project( pagwin_iterator_tools
|
||||
project(project_name_here
|
||||
VERSION 0.1
|
||||
LANGUAGES CXX)
|
||||
|
||||
# setting this so compile_commands.json is generated for clangd
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
||||
|
||||
# for convenience if they're needed
|
||||
#find_package(Boost REQUIRED)
|
||||
#find_package(fmt REQUIRED)
|
||||
|
||||
# lib src code
|
||||
add_subdirectory(src)
|
||||
|
||||
# app source code
|
||||
add_subdirectory(apps)
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
# Pagwin's Iterator Tools (PIT)
|
||||
I'm not double checking C++20/23 or boost to see if they make this lib redundant if they do use them.
|
||||
|
||||
This library is for my personal use to get easy and convenient access to useful C++ iterators without needing to remake them every time
|
8
apps/CMakeLists.txt
Normal file
8
apps/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# based heavily on https://gitlab.com/CLIUtils/modern-cmake/-/blob/master/examples/extended-project/apps/CMakeLists.txt
|
||||
|
||||
add_executable(exe_name exe_entry.cpp)
|
||||
|
||||
# example library link
|
||||
#target_link_libraries(exe_name fmt::fmt)
|
||||
|
||||
target_compile_features(exe_name PRIVATE cxx_std_20)
|
4
apps/exe_entry.cpp
Normal file
4
apps/exe_entry.cpp
Normal file
|
@ -0,0 +1,4 @@
|
|||
int main(void){
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,17 +1,17 @@
|
|||
# based heavily on https://gitlab.com/CLIUtils/modern-cmake/-/blob/master/examples/extended-project/src/CMakeLists.txt
|
||||
|
||||
# example from when I was doing raft cpp impl
|
||||
set(HEADER_LIST "${pagwin_iterator_tools_SOURCE_DIR}/include/pit/iters.h" "${pagwin_iterator_tools_SOURCE_DIR}/include/pit/manipulators.h")
|
||||
#set(HEADER_LIST "${raft_cpp_impl_SOURCE_DIR}/include/raft/lib.hpp")
|
||||
|
||||
add_library(pit lib.cpp ${HEADER_LIST})
|
||||
add_library(example_lib lib.cpp ${HEADER_LIST})
|
||||
|
||||
# We need this directory, and users of our library will need it too
|
||||
target_include_directories(pit PUBLIC ../include)
|
||||
target_include_directories(exaple_lib PUBLIC ../include)
|
||||
|
||||
|
||||
#target_link_libraries(example_lib PRIVATE Boost::boost)
|
||||
|
||||
target_compile_features(pit PUBLIC cxx_std_17)
|
||||
target_compile_features(example_lib PUBLIC cxx_std_17)
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
source_group(
|
||||
|
|
Loading…
Reference in a new issue