-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acbe15d
commit 32f7c2b
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CMakeLists.txt.user | ||
CMakeCache.txt | ||
CMakeFiles | ||
CMakeScripts | ||
Testing | ||
Makefile | ||
cmake_install.cmake | ||
install_manifest.txt | ||
compile_commands.json | ||
CTestTestfile.cmake | ||
_deps | ||
CMakeUserPresets.json | ||
build | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
|
||
project("ABS SCPI Driver" VERSION 0.0.1) | ||
|
||
include(FetchContent) | ||
|
||
find_package(fmt 10.2.0 QUIET) | ||
if(NOT fmt_FOUND) | ||
FetchContent_Declare(fmt | ||
GIT_REPOSITORY https://github.com/fmtlib/fmt.git | ||
GIT_TAG 10.2.1 | ||
GIT_SHALLOW TRUE | ||
) | ||
FetchContent_GetProperties(fmt) | ||
if(NOT fmt_POPULATED) | ||
message(STATUS "Fetch fmt") | ||
FetchContent_Populate(fmt) | ||
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR} EXCLUDE_FROM_ALL) | ||
endif() | ||
endif() | ||
|
||
find_package(Boost 1.81.0 COMPONENTS system QUIET) | ||
if (NOT Boost_FOUND) | ||
set(BOOST_INCLUDE_LIBRARIES system asio) | ||
set(BOOST_ENABLE_CMAKE ON) | ||
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") | ||
cmake_policy(SET CMP0135 NEW) | ||
endif() | ||
FetchContent_Declare(Boost | ||
SYSTEM | ||
URL https://github.com/boostorg/boost/releases/download/boost-1.81.0/boost-1.81.0.tar.gz | ||
URL_HASH "SHA1=f71f661f893f39b7b82d66c54980349716f874a2" | ||
) | ||
FetchContent_GetProperties(Boost) | ||
if(NOT Boost_POPULATED) | ||
message(STATUS "Fetch Boost (may take a while)") | ||
FetchContent_MakeAvailable(Boost) | ||
endif() | ||
endif() | ||
|
||
add_library(bciabs_scpi src/ScpiDriver.cpp) | ||
|
||
target_compile_features(bciabs_scpi PUBLIC cxx_std_20) | ||
|
||
target_compile_options(bciabs_scpi PRIVATE -Wall -Wextra) | ||
|
||
target_include_directories(bciabs_scpi PUBLIC ${PROJECT_SOURCE_DIR}/include) | ||
|
||
target_link_libraries(bciabs_scpi PRIVATE fmt::fmt-header-only) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef ABS_SCPI_DRIVER_INCLUDE_BCI_ABS_SCPIDRIVER_H | ||
#define ABS_SCPI_DRIVER_INCLUDE_BCI_ABS_SCPIDRIVER_H | ||
|
||
namespace bci::abs { | ||
|
||
class ScpiDriver { | ||
public: | ||
ScpiDriver(); | ||
|
||
~ScpiDriver(); | ||
}; | ||
|
||
} // namespace bci::abs | ||
|
||
#endif /* ABS_SCPI_DRIVER_INCLUDE_BCI_ABS_SCPIDRIVER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <bci/abs/ScpiDriver.h> | ||
|
||
namespace bci::abs { | ||
|
||
ScpiDriver::ScpiDriver() {} | ||
|
||
ScpiDriver::~ScpiDriver() {} | ||
|
||
} // namespace bci::abs |