-
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.
Basic structure of repo created using conanfile, cmakelists and gtest.
- Loading branch information
0 parents
commit dc7c2d8
Showing
8 changed files
with
85 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,9 @@ | ||
AccessModifierOffset: -3 | ||
BasedOnStyle: Chromium | ||
BreakBeforeBraces: Allman | ||
ColumnLimit: '120' | ||
IndentWidth: '3' | ||
Language: Cpp | ||
MaxEmptyLinesToKeep: '1' | ||
NamespaceIndentation: None | ||
UseTab: Never |
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,2 @@ | ||
build | ||
.vscode |
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,18 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
|
||
PROJECT("magicparams") | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
add_executable(magicparams) | ||
add_executable(magicparamstests) | ||
|
||
target_link_libraries(magicparamstests PRIVATE CONAN_PKG::gtest) | ||
|
||
target_include_directories(magicparams PUBLIC include) | ||
target_include_directories(magicparamstests PRIVATE include) | ||
|
||
target_sources(magicparams PUBLIC include/magic_params.hpp) | ||
target_sources(magicparams PRIVATE src/main.cpp) | ||
target_sources(magicparamstests PRIVATE tests/test.cpp) |
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 @@ | ||
# MagicParams |
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,30 @@ | ||
from importlib.metadata import requires | ||
from conans import ConanFile, CMake, tools | ||
|
||
|
||
class MagicParams(ConanFile): | ||
name = "magicparams" | ||
version = "1.0" | ||
author = "EddyXorb" | ||
description = "Map enum values to different plain old datatypes and string and check and set and retrieve them without having to remember which parameter maps to which type. " | ||
settings = "os", "compiler", "build_type", "arch" | ||
options = {"shared": [True, False], "fPIC": [True, False]} | ||
default_options = {"shared": False, "fPIC": True} | ||
generators = "cmake" | ||
exports_sources = "*" | ||
requires = "gtest/1.12.1" | ||
|
||
def config_options(self): | ||
if self.settings.os == "Windows": | ||
del self.options.fPIC | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure(".") | ||
cmake.build() | ||
|
||
def package(self): | ||
self.copy("*.hpp", dst="include", src="include") | ||
|
||
def package_info(self): | ||
self.cpp_info.libs = ["enummap"] |
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,6 @@ | ||
#include <unordered_map> | ||
|
||
class MagicParams | ||
{ | ||
|
||
}; |
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,8 @@ | ||
|
||
#include <iostream> | ||
#include <magic_params.hpp> | ||
|
||
int main() | ||
{ | ||
std::cout << "HELLO!"; | ||
} |
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,11 @@ | ||
#include "gtest/gtest.h" | ||
|
||
#include "magic_params.hpp" | ||
class MagicParamsTester : public ::testing::Test | ||
{ | ||
}; | ||
|
||
TEST_F(MagicParamsTester, simpletest) | ||
{ | ||
EXPECT_TRUE(true); | ||
}; |