Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knutel/peter d cmake include fixes #397

Merged
53 commits merged into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
098160b
simpler boost detection on mac
Feb 3, 2023
b2b5a2e
cmake clean up: target specific include paths
Feb 6, 2023
e141720
boost 1.76
Feb 6, 2023
adce649
boost 1.72 specific magic no longer needed
Feb 6, 2023
296f7ef
Merge remote-tracking branch 'origin/master' into HEAD
Feb 6, 2023
93a031f
Merged Peter's master branch with some cmake fixes on my end
Feb 6, 2023
120aafd
Moved reliance on include paths back to sparta.cmake file
Feb 6, 2023
39c889e
Made simdb include a private include
Feb 6, 2023
1f7ed09
PUBLIC includes for Sparta and SimDB to pass to regression
Feb 6, 2023
cc8f62f
Small cleanup; added missing SimDB testers target include
Feb 6, 2023
667ec0c
cmake file to enable find_package(Sparta) in other projects
Feb 9, 2023
4c3ab3f
make sure we include the testing macros
Feb 9, 2023
736df39
also installing sparta/cache
Feb 9, 2023
3af0543
make sure core setup.py actually uses the interpreter found by find_p…
Feb 9, 2023
eac0f29
more modern way to find python3, hopefully also robust in conda/venv
Feb 9, 2023
41827fe
cleaner cmake for testing macros for simdb and sparta
Feb 10, 2023
39b9147
helios build now using FindSparta.cmake
Feb 10, 2023
88c595b
pipeviewer cannot use find_package(sparta), which only works once ins…
Feb 10, 2023
3edcc33
installing all py files and libs but module paths don't work yet afte…
Feb 15, 2023
05178f7
simpler setup for cython build - working for transactiondb, rest todo
Feb 16, 2023
c6eb29e
cleaner HDF5 libs config for sparta
Feb 16, 2023
546ded4
Documentation cleanup
Feb 16, 2023
3cc1cf0
Major rehaul of how argos ties into cmake
Feb 20, 2023
ad50d90
Merge remote-tracking branch 'origin/master' into knutel/peter-d_cmak…
Feb 20, 2023
645d82e
Fixed static method calls w/o object
Feb 21, 2023
6e706ac
Move __is_mac_os and __gen_message outside of the ShortcutHelp class
bdutro Feb 21, 2023
81b1b99
Clean up flake8 errors
bdutro Feb 21, 2023
fa74476
make sure setuptools and cython use the right C/CXX/LD
Feb 21, 2023
133686c
proper dependencies for setup.py
Feb 21, 2023
98eff34
gui script vs console script: should properly call pythonw
Feb 21, 2023
7d94d80
build argos_dumper again
Feb 21, 2023
0230f86
_ vs __ otherwise cannot find the free helper functions in the class
Feb 21, 2023
4af184f
Move sparta library target towards the end of sparta/CMakeLists.txt so
bdutro Feb 21, 2023
fd4490d
Pass CMAKE_INSTALL_PREFIX to setup.py install
bdutro Feb 21, 2023
e86ec7c
Add Github workflow to run linters on Argos
bdutro Feb 21, 2023
4572c9c
Merge remote-tracking branch 'refs/remotes/origin/knutel/peter-d_cmak…
Feb 24, 2023
373f7f9
Set a a CMAKE_MACRO file path for the testers; allows sparta build an…
Feb 24, 2023
28b9b06
Update README.md for Conda on MacOS
benoy-sifive Feb 26, 2023
b659286
seperated build for sparta and helios folder
Feb 28, 2023
6c3865a
Updated README and build rules for new layout
Mar 1, 2023
a84e91e
Fixed bad dir path in regression
Mar 1, 2023
0168889
Renamed DatabaseDump tool
Mar 1, 2023
cd34a5d
Added missing rt library for Linux builds
Mar 2, 2023
3482904
Put in check for CPP check module
Mar 2, 2023
3b76800
Fixed new compilation issue with HDF test
Mar 2, 2023
29992e5
ANOTHER HDF5 test fix
Mar 2, 2023
2ebd540
Forced HDF5 test to be C++ testing
Mar 2, 2023
39cc0ed
Removed rt library link
Mar 2, 2023
8a4c272
ONE more tweak: use CXX version of HDF5
Mar 3, 2023
fc9ec7f
Merge remote-tracking branch 'origin/master' into knutel/peter-d_cmak…
Mar 6, 2023
53f223f
Merge remote-tracking branch 'origin/benoy-sifive-readme_conda_macos'…
Mar 6, 2023
895c7b1
Fixed formatting
Mar 6, 2023
22dcecc
Updated README with install directions
Mar 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helios/pipeViewer/transactiondb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(TRANSACTIONDB_SRC_DIR ${PROJECT_SOURCE_DIR}/src)
##################################################################
# FIXME use consistent cmake recipe for python extensions here and in ..
add_custom_command(OUTPUT transactiondb.sh
COMMAND printf 'SYSINCDIRS="$ENV{SYSINCDIRS}"
COMMAND printf 'SYSINCDIRS="${YAML_CPP_INCLUDE_DIR}"
PY_SRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}/src"
SPARTA_BASE="${SPARTA_BASE}"
TARGETDIR="lib"
Expand Down
25 changes: 6 additions & 19 deletions sparta/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ set (GEN_DEBUG_INFO ON CACHE BOOL "Genearate debug info in compile & link -g")
set (SPARTA_BASE ${CMAKE_CURRENT_SOURCE_DIR})
include (${SPARTA_BASE}/cmake/sparta-config.cmake)

# Add RapidJSON
include_directories (SYSTEM ${RAPIDJSON_INCLUDE_DIRS})

# Add YAML CPP
include_directories (SYSTEM ${YAML_CPP_INCLUDE_DIR})

# Add local includes
include_directories ("./")
include_directories ("simdb/include")

# Add Boost (not typical system install)
include_directories (SYSTEM ${Boost_INCLUDE_DIRS})

# Add HDF5 (not typical system install)
include_directories (SYSTEM ${HDF5_C_INCLUDE_DIRS})
include_directories (SYSTEM ${HDF5_INCLUDE_DIRS})

# Add the source for libsparta.a
list (APPEND SourceCppFiles
src/ArgosOutputter.cpp
Expand Down Expand Up @@ -105,6 +88,12 @@ if (COMPILE_WITH_PYTHON)
python/sparta_support/Completer.cpp)
endif ()

add_library (sparta ${SourceCppFiles})

# Add local includes
target_include_directories (sparta PRIVATE "./")
This conversation was marked as resolved.
Show resolved Hide resolved
target_include_directories (sparta PRIVATE "simdb/include")

execute_process (COMMAND bash "-c" "git describe --tags --always"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_REPO_VERSION RESULT_VARIABLE rc
Expand Down Expand Up @@ -221,7 +210,6 @@ set (CPPCHECK_EXCLUDES
)
find_package (Cppcheck)

add_library (sparta ${SourceCppFiles})
set (SPARTA_STATIC_LIBS ${PROJECT_BINARY_DIR}/libsparta.a)

# Build the SimDB library
Expand All @@ -233,7 +221,6 @@ add_subdirectory (simdb)
add_subdirectory (test EXCLUDE_FROM_ALL)
add_subdirectory (example EXCLUDE_FROM_ALL)


#
# Installation
#
Expand Down
27 changes: 9 additions & 18 deletions sparta/cmake/sparta-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ if (Sparta_VERBOSE)
set (CMAKE_FIND_DEBUG_MODE ON) # verbosity for find_package
endif()

set (Boost_USE_STATIC_LIBS OFF)

# BOOST_CMAKE logic for in versions before 1.72 to ask for the shared libraries is broken, you can only force it to use
# them if you're building shared libs? wtf?
set (existing_build_shared ${BUILD_SHARED_LIBS})
set (BUILD_SHARED_LIBS ON)

execute_process (COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE CXX_VERSION_STRING RESULT_VARIABLE rc)
if (NOT rc EQUAL "0")
message (FATAL_ERROR "could not run compiler command '${CMAKE_CXX_COMPILER} --version', rc=${rc}")
Expand All @@ -45,39 +38,37 @@ else ()
set (USING_CONDA OFF)
endif ()


if (APPLE AND NOT USING_CONDA)
set (Boost_NO_BOOST_CMAKE ON)
set (CMAKE_CXX_COMPILER_VERSION 10.0)
find_package (Boost 1.65.0 REQUIRED HINTS /usr/local/Cellar/boost/* COMPONENTS ${_BOOST_COMPONENTS})
else ()
find_package (Boost 1.65.0 REQUIRED COMPONENTS ${_BOOST_COMPONENTS})
endif ()

set (BUILD_SHARED_LIBS ${existing_build_shared})
# Find Boost
set (Boost_USE_STATIC_LIBS OFF)
find_package (Boost 1.76.0 REQUIRED COMPONENTS ${_BOOST_COMPONENTS})
message (STATUS "Using BOOST ${Boost_VERSION_STRING}")
include_directories (SYSTEM ${Boost_INCLUDE_DIRS})
This conversation was marked as resolved.
Show resolved Hide resolved

# Find YAML CPP
find_package (yaml-cpp 0.6 REQUIRED)
message (STATUS "Using YAML CPP ${yaml-cpp_VERSION}")
get_property(YAML_CPP_INCLUDE_DIR TARGET yaml-cpp PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
include_directories (SYSTEM ${YAML_CPP_INCLUDE_DIR})

# Find RapidJSON
find_package (RapidJSON 1.1 REQUIRED)
include_directories (SYSTEM ${RapidJSON_INCLUDE_DIRS})
message (STATUS "Using RapidJSON CPP ${RapidJSON_VERSION}")

# Find SQLite3
find_package (SQLite3 3.19 REQUIRED)
include_directories (SYSTEM ${SQLite3_INCLUDE_DIRS})
message (STATUS "Using SQLite3 ${SQLite3_VERSION}")

# Find zlib
find_package(ZLIB REQUIRED)
message (STATUS "Using zlib ${ZLIB_VERSION_STRING}")
include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS})
message (STATUS "Using zlib ${ZLIB_VERSION_STRING}")

# Find HDF5. Need to enable C language for HDF5 testing
enable_language (C)
find_package (HDF5 1.10 REQUIRED)
include_directories (SYSTEM ${HDF5_INCLUDE_DIRS})

# Populate the Sparta_LIBS variable with the required libraries for
# basic Sparta linking
Expand Down
19 changes: 10 additions & 9 deletions sparta/simdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ include_directories(${SIMDB_BASE}/include)
include(${SIMDB_BASE}/cmake/simdb-config.cmake)

list(APPEND SimDB_CPP
src/HDF5Connection.cpp
src/ObjectManager.cpp
src/ObjectRef.cpp
src/SQLiteConnection.cpp
src/TableRef.cpp
src/simdb.cpp)
src/HDF5Connection.cpp
src/ObjectManager.cpp
src/ObjectRef.cpp
src/SQLiteConnection.cpp
src/TableRef.cpp
src/simdb.cpp)

add_library(simdb ${SimDB_CPP})

add_subdirectory(test EXCLUDE_FROM_ALL)

install(TARGETS simdb
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(DIRECTORY include/ DESTINATION include)