Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit 7695ac5

Browse files
authored
Merge pull request #42 from sbromberger/sbromberger/testdf
Sbromberger/testdf
2 parents 5fe4215 + ef5c3be commit 7695ac5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3015
-50
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@ CMakeDoxyfile.in
55
CMakeDoxygenDefaults.cmake
66
DartConfiguration.tcl
77
__pycache__
8+
/.vscode
9+
/.devcontainer
10+
*.dSYM
11+
testbracket
12+
testmvmap
13+
testdf
14+
testgraph

CM-broken.txt

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Copyright 2020 Lawrence Livermore National Security, LLC and other CLIPPy
2+
# Project Developers. See the top-level COPYRIGHT file for details.
3+
#
4+
# SPDX-License-Identifier: MIT
5+
6+
# Works with 3.11 and tested through 3.15 (not tested yet)
7+
cmake_minimum_required(VERSION 3.14)
8+
set(ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE)
9+
10+
project(CLIPPy
11+
VERSION 0.2
12+
DESCRIPTION "Command Line Interface Plus Python"
13+
LANGUAGES CXX)
14+
15+
include(FetchContent)
16+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
17+
18+
# Only do these if this is the main project, and not if it is included through add_subdirectory
19+
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
20+
21+
set(CMAKE_CXX_STANDARD 20)
22+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
23+
24+
# Let's ensure -std=c++xx instead of -std=g++xx
25+
set(CMAKE_CXX_EXTENSIONS OFF)
26+
27+
# Let's nicely support folders in IDE's
28+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
29+
30+
# Testing only available if this is the main app
31+
# Note this needs to be done in the main CMakeLists
32+
# since it calls enable_testing, which must be in the
33+
# main CMakeLists.
34+
include(CTest)
35+
36+
# Docs only available if this is the main app
37+
find_package(Doxygen)
38+
if(Doxygen_FOUND)
39+
#add_subdirectory(docs)
40+
else()
41+
message(STATUS "Doxygen not found, not building docs")
42+
endif()
43+
endif()
44+
45+
#
46+
# Metall
47+
# find_package(Metall QUIET)
48+
# if (NOT Metall_FOUND)
49+
# #set(METALL_WORK_DIR ${CMAKE_CURRENT_BINARY_DIR}/metall-work)
50+
# set(METALL_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/metall-src)
51+
# set(METALL_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/metall-build)
52+
# set(METALL_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/metall-install)
53+
# FetchContent_Declare(Metall
54+
# GIT_REPOSITORY https://github.com/LLNL/metall.git
55+
# GIT_TAG master
56+
# )
57+
# # SOURCE_DIR ${METALL_SOURCE_DIR}
58+
# # BINARY_DIR ${METALL_BUILD_DIR}
59+
# # CMAKE_ARGS -DINSTALL_HEADER_ONLY=ON -DCMAKE_INSTALL_PREFIX=${METALL_INSTALL_DIR}
60+
# # )
61+
# # set(METALL_INCLUDE_DIR ${METALL_INSTALL_DIR}/include)
62+
# FetchContent_MakeAvailable(Metall)
63+
# endif ()
64+
65+
# find_package(Threads REQUIRED)
66+
67+
68+
#
69+
# Boost
70+
# find_package(Boost 1.83 REQUIRED COMPONENTS)
71+
72+
include(FetchContent)
73+
74+
# Fetch Boost
75+
FetchContent_Declare(
76+
boost
77+
GIT_REPOSITORY https://github.com/boostorg/boost.git
78+
GIT_TAG boost-1.83.0 # Replace with the desired Boost version
79+
GIT_PROGRESS TRUE
80+
)
81+
FetchContent_MakeAvailable(boost)
82+
83+
# Ensure submodules for Boost.JSON are initialized
84+
add_subdirectory(${boost_SOURCE_DIR}/libs/json ${boost_BINARY_DIR}/boost-json)
85+
86+
87+
### Require out-of-source builds
88+
file(TO_CMAKE_PATH "${PROJECT_BINARY_DIR}/CMakeLists.txt" LOC_PATH)
89+
if(EXISTS "${LOC_PATH}")
90+
message(FATAL_ERROR "You cannot build in a source directory (or any directory with a CMakeLists.txt file). Please make a build subdirectory. Feel free to remove CMakeCache.txt and CMakeFiles.")
91+
endif()
92+
93+
include_directories("${PROJECT_SOURCE_DIR}/include")
94+
95+
option(TEST_WITH_SLURM "Run tests with Slurm" OFF)
96+
97+
# Header-only library, so likely not have src dir
98+
# add_subdirectory(src)
99+
100+
# Testing & examples are only available if this is the main app
101+
# Emergency override MODERN_CMAKE_BUILD_TESTING provided as well
102+
if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR MODERN_CMAKE_BUILD_TESTING) AND BUILD_TESTING)
103+
add_subdirectory(test)
104+
# Example codes are here.
105+
#add_subdirectory(examples)
106+
endif()

CM-working.txt

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Copyright 2020 Lawrence Livermore National Security, LLC and other CLIPPy
2+
# Project Developers. See the top-level COPYRIGHT file for details.
3+
#
4+
# SPDX-License-Identifier: MIT
5+
6+
# Works with 3.11 and tested through 3.15 (not tested yet)
7+
cmake_minimum_required(VERSION 3.14)
8+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
9+
set(ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE)
10+
11+
project(CLIPPy
12+
VERSION 0.2
13+
DESCRIPTION "Command Line Interface Plus Python"
14+
LANGUAGES CXX)
15+
16+
include(FetchContent)
17+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
18+
19+
# Only do these if this is the main project, and not if it is included through add_subdirectory
20+
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
21+
22+
set(CMAKE_CXX_STANDARD 20)
23+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
24+
25+
# Let's ensure -std=c++xx instead of -std=g++xx
26+
set(CMAKE_CXX_EXTENSIONS OFF)
27+
28+
# Let's nicely support folders in IDE's
29+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
30+
31+
# Testing only available if this is the main app
32+
# Note this needs to be done in the main CMakeLists
33+
# since it calls enable_testing, which must be in the
34+
# main CMakeLists.
35+
include(CTest)
36+
37+
# Docs only available if this is the main app
38+
find_package(Doxygen)
39+
if(Doxygen_FOUND)
40+
#add_subdirectory(docs)
41+
else()
42+
message(STATUS "Doxygen not found, not building docs")
43+
endif()
44+
endif()
45+
46+
#
47+
# Metall
48+
# find_package(Metall QUIET)
49+
# if (NOT Metall_FOUND)
50+
# #set(METALL_WORK_DIR ${CMAKE_CURRENT_BINARY_DIR}/metall-work)
51+
# set(METALL_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/metall-src)
52+
# set(METALL_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/metall-build)
53+
# set(METALL_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/metall-install)
54+
# FetchContent_Declare(Metall
55+
# GIT_REPOSITORY https://github.com/LLNL/metall.git
56+
# GIT_TAG master
57+
# )
58+
# # SOURCE_DIR ${METALL_SOURCE_DIR}
59+
# # BINARY_DIR ${METALL_BUILD_DIR}
60+
# # CMAKE_ARGS -DINSTALL_HEADER_ONLY=ON -DCMAKE_INSTALL_PREFIX=${METALL_INSTALL_DIR}
61+
# # )
62+
# # set(METALL_INCLUDE_DIR ${METALL_INSTALL_DIR}/include)
63+
# FetchContent_MakeAvailable(Metall)
64+
# endif ()
65+
66+
# find_package(Threads REQUIRED)
67+
68+
69+
#
70+
# Boost
71+
# find_package(Boost 1.83 REQUIRED COMPONENTS)
72+
73+
#
74+
# Boost
75+
include(setup_boost)
76+
prepare_fetchcontent_boost()
77+
set(FETCHCONTENT_QUIET FALSE)
78+
FetchContent_Declare(
79+
Boost
80+
GIT_REPOSITORY https://github.com/boostorg/boost.git
81+
GIT_TAG boost-1.83.0
82+
GIT_SUBMODULES ${BOOST_REQD_SUBMODULES}
83+
GIT_PROGRESS TRUE
84+
CONFIGURE_COMMAND "" # tell CMake it's not a cmake project
85+
)
86+
FetchContent_MakeAvailable(Boost)
87+
get_boost_include_dirs()
88+
89+
90+
### Require out-of-source builds
91+
file(TO_CMAKE_PATH "${PROJECT_BINARY_DIR}/CMakeLists.txt" LOC_PATH)
92+
if(EXISTS "${LOC_PATH}")
93+
message(FATAL_ERROR "You cannot build in a source directory (or any directory with a CMakeLists.txt file). Please make a build subdirectory. Feel free to remove CMakeCache.txt and CMakeFiles.")
94+
endif()
95+
96+
include_directories("${PROJECT_SOURCE_DIR}/include")
97+
98+
option(TEST_WITH_SLURM "Run tests with Slurm" OFF)
99+
100+
# Header-only library, so likely not have src dir
101+
# add_subdirectory(src)
102+
103+
# Testing & examples are only available if this is the main app
104+
# Emergency override MODERN_CMAKE_BUILD_TESTING provided as well
105+
if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR MODERN_CMAKE_BUILD_TESTING) AND BUILD_TESTING)
106+
add_subdirectory(test)
107+
# Example codes are here.
108+
#add_subdirectory(examples)
109+
endif()

CMakeLists.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# Works with 3.11 and tested through 3.15 (not tested yet)
77
cmake_minimum_required(VERSION 3.14)
8+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
89
set(ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE)
910

1011
project(CLIPPy
@@ -18,7 +19,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1819
# Only do these if this is the main project, and not if it is included through add_subdirectory
1920
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
2021

21-
set(CMAKE_CXX_STANDARD 17)
22+
set(CMAKE_CXX_STANDARD 20)
2223
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2324

2425
# Let's ensure -std=c++xx instead of -std=g++xx
@@ -67,7 +68,24 @@ endif()
6768

6869
#
6970
# Boost
70-
find_package(Boost 1.75 REQUIRED COMPONENTS)
71+
# find_package(Boost 1.83 REQUIRED COMPONENTS)
72+
73+
#
74+
# Boost
75+
include(setup_boost)
76+
prepare_fetchcontent_boost()
77+
set(FETCHCONTENT_QUIET FALSE)
78+
FetchContent_Declare(
79+
Boost
80+
GIT_REPOSITORY https://github.com/boostorg/boost.git
81+
GIT_TAG boost-1.83.0
82+
GIT_SUBMODULES ${BOOST_REQD_SUBMODULES}
83+
GIT_PROGRESS TRUE
84+
CONFIGURE_COMMAND "" # tell CMake it's not a cmake project
85+
)
86+
FetchContent_MakeAvailable(Boost)
87+
get_boost_include_dirs()
88+
7189

7290
### Require out-of-source builds
7391
file(TO_CMAKE_PATH "${PROJECT_BINARY_DIR}/CMakeLists.txt" LOC_PATH)

cmake/setup_boost.cmake

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
function(prepare_fetchcontent_boost)
2+
set(BOOST_INCLUDE_LIBRARIES json PARENT_SCOPE)
3+
set(BOOST_ENABLE_CMAKE ON PARENT_SCOPE)
4+
5+
set(BOOST_REQD_SUBMODULES
6+
"tools/cmake;"
7+
"libs/assert;"
8+
"libs/exception;"
9+
"libs/throw_exception;"
10+
"libs/static_assert;"
11+
"libs/config;"
12+
"libs/container;"
13+
"libs/container_hash;"
14+
"libs/utility;"
15+
"libs/type_traits;"
16+
"libs/move;"
17+
"libs/tuple;"
18+
"libs/variant2;"
19+
"libs/detail;"
20+
"libs/smart_ptr;"
21+
"libs/integer;"
22+
"libs/intrusive;"
23+
"libs/io;"
24+
# "libs/iostreams;"
25+
"libs/describe;"
26+
"libs/core;"
27+
"libs/align;"
28+
"libs/predef;"
29+
"libs/preprocessor;"
30+
"libs/system;"
31+
"libs/winapi;"
32+
"libs/mp11;"
33+
"libs/json;"
34+
# "libs/property_tree;"
35+
# "libs/interprocess;"
36+
# "libs/optional;"
37+
# "libs/any;"
38+
# "libs/type_index;"
39+
# "libs/mpl;"
40+
# "libs/multi_index;"
41+
# "libs/serialization;"
42+
# "libs/bind;"
43+
# "libs/foreach;"
44+
# "libs/iterator;"
45+
# "libs/headers;"
46+
# "libs/format;"
47+
# "libs/range;"
48+
# "libs/concept_check;"
49+
# "libs/uuid;"
50+
# "libs/random;"
51+
# "libs/tti;"
52+
# "libs/function_types;"
53+
PARENT_SCOPE)
54+
endfunction()
55+
56+
function(get_boost_include_dirs)
57+
list(APPEND BOOST_INCLUDE_DIRS
58+
# ${Boost_SOURCE_DIR}/libs/interprocess/include
59+
# ${Boost_SOURCE_DIR}/libs/property_tree/include
60+
# ${Boost_SOURCE_DIR}/libs/optional/include
61+
# ${Boost_SOURCE_DIR}/libs/any/include
62+
# ${Boost_SOURCE_DIR}/libs/type_index/include
63+
# ${Boost_SOURCE_DIR}/libs/mpl/include
64+
# ${Boost_SOURCE_DIR}/libs/bind/include
65+
# ${Boost_SOURCE_DIR}/libs/multi_index/include
66+
# ${Boost_SOURCE_DIR}/libs/serialization/include
67+
# ${Boost_SOURCE_DIR}/libs/foreach/include
68+
# ${Boost_SOURCE_DIR}/libs/iterator/include
69+
${Boost_SOURCE_DIR}/libs/container/include
70+
# ${Boost_SOURCE_DIR}/libs/unordered/include
71+
# ${Boost_SOURCE_DIR}/libs/iostreams/include
72+
${Boost_SOURCE_DIR}/libs/system/include
73+
${Boost_SOURCE_DIR}/libs/describe/include
74+
# ${Boost_SOURCE_DIR}/libs/format/include
75+
# ${Boost_SOURCE_DIR}/libs/range/include
76+
# ${Boost_SOURCE_DIR}/libs/concept_check/include
77+
# ${Boost_SOURCE_DIR}/libs/uuid/include
78+
# ${Boost_SOURCE_DIR}/libs/random/include
79+
# ${Boost_SOURCE_DIR}/libs/tti/include
80+
# ${Boost_SOURCE_DIR}/libs/function_types/include
81+
)
82+
set(BOOST_INCLUDE_DIRS ${BOOST_INCLUDE_DIRS} PARENT_SCOPE)
83+
endfunction()

0 commit comments

Comments
 (0)