Skip to content

Commit d981a78

Browse files
committed
gitignore, first include and CMakeLists.txt
1 parent bf4205d commit d981a78

File tree

3 files changed

+98
-4
lines changed

3 files changed

+98
-4
lines changed

.gitignore

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
*.dylib
1717
*.dll
1818

19-
# Fortran module files
20-
*.mod
21-
*.smod
22-
2319
# Compiled Static libraries
2420
*.lai
2521
*.la
@@ -30,3 +26,28 @@
3026
*.exe
3127
*.out
3228
*.app
29+
30+
# Vim tmp files
31+
*.swp
32+
33+
# Build directory
34+
build/
35+
36+
# Test build artefacts
37+
test/test_xtensor
38+
test/CMakeCache.txt
39+
test/Makefile
40+
test/CMakeFiles/
41+
test/cmake_install.cmake
42+
43+
# Documentation build artefacts
44+
docs/CMakeCache.txt
45+
docs/xml/
46+
docs/build/
47+
docs/*.tmp
48+
49+
# Jupyter artefacts
50+
.ipynb_checkpoints/
51+
52+
# Generated files
53+
*.pc

CMakeLists.txt

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
############################################################################
2+
# Copyright (c) 2018, Johan Mabille, Sylvain Corlay, Wolf Vollprecht and #
3+
# Martin Renou #
4+
# #
5+
# Distributed under the terms of the BSD 3-Clause License. #
6+
# #
7+
# The full license is in the file LICENSE, distributed with this software. #
8+
############################################################################
9+
10+
cmake_minimum_required(VERSION 3.1)
11+
project(xplugin)
12+
13+
set(XPLUGIN_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
14+
set(XPLUGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
15+
16+
# Versionning
17+
# ===========
18+
19+
file(STRINGS "${XPLUGIN_INCLUDE_DIR}/xplugin/xplugin_config.hpp" xplugin_version_defines
20+
REGEX "#define XPLUGIN_VERSION_(MAJOR|MINOR|PATCH)")
21+
foreach(ver ${xplugin_version_defines})
22+
if(ver MATCHES "#define XPLUGIN_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$")
23+
set(XPLUGIN_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" CACHE INTERNAL "")
24+
endif()
25+
endforeach()
26+
set(${PROJECT_NAME}_VERSION
27+
${XPLUGIN_VERSION_MAJOR}.${XPLUGIN_VERSION_MINOR}.${XPLUGIN_VERSION_PATCH})
28+
message(STATUS "Building xplugin v${${PROJECT_NAME}_VERSION}")
29+
30+
# Dependencies
31+
# ============
32+
33+
# Source files
34+
# ============
35+
36+
set(XPLUGIN_HEADERS
37+
${XPLUGIN_INCLUDE_DIR}/xplugin/xplugin_config.hpp
38+
)
39+
40+
set(XPLUGIN_SOURCES
41+
)
42+
43+
# Output
44+
# ======

include/xplugin/xplugin_config.hpp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/***************************************************************************
2+
* Copyright (c) 2018, Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
3+
* Martin Renou *
4+
* *
5+
* Distributed under the terms of the BSD 3-Clause License. *
6+
* *
7+
* The full license is in the file LICENSE, distributed with this software. *
8+
****************************************************************************/
9+
10+
#ifndef XPLUGIN_CONFIG_HPP
11+
#define XPLUGIN_CONFIG_HPP
12+
13+
#ifdef _WIN32
14+
#ifdef XPLUGIN_EXPORTS
15+
#define XPLUGIN_API __declspec(dllexport)
16+
#else
17+
#define XPLUGIN_API __declspec(dllimport)
18+
#endif
19+
#else
20+
#define XPLUGIN_API
21+
#endif
22+
23+
// Project version
24+
#define XPLUGIN_VERSION_MAJOR 0
25+
#define XPLUGIN_VERSION_MINOR 0
26+
#define XPLUGIN_VERSION_PATCH 0
27+
28+
#endif
29+

0 commit comments

Comments
 (0)