Commit 12225f54 authored by Michaël Roynard's avatar Michaël Roynard

Merge branch 'dev' into 'master'

Minor fixes

See merge request !6
parents ea43c907 ef92db90
Pipeline #2109 passed with stage
in 1 minute and 45 seconds
variables:
CC: "gcc" # eg. gcc or clang
CXX: "g++" # eg. g++ or clang++
RELEASE_TYPE: "Release" # default release type
CONAN_PROFILE: "gcc-release" # default profile to give to conan install
CMAKE_GENERATOR: "-G Ninja" # include -G if defined
BUILD_DIRECTORY: "build-in-docker" # build directory name
SOURCE_DIRECTORY: ".." # where cmake search source files from the build directory
TARGET: "check" # target to invoke
CLEAN: "OFF" # whether to rm -rf * in build directory before running cmake
TESTS: "ON" # build and run unit tests
CC: "gcc" # eg. gcc or clang
CXX: "g++" # eg. g++ or clang++
RELEASE_TYPE: "Release" # default release type
CONAN_PROFILE: "gcc-release" # profile to use with conan
CONAN_REMOTE_NAME: "dutiona-lrde" # Conan remote name
CONAN_REMOTE_URL: "https://api.bintray.com/conan/dutiona/lrde" # Conan remote name
CONAN_USER: "dutiona" # Conan user name
CONAN_API_KEY: "e2a665548385e82bf1ecbb4739d3582b83b8235f" # Conan API key on public bintray repositories
NAME: "gtest-constexpr-ext" # Conan package name
TAG: "stable" # Conan tag
VERSION: "0.1" # Version to build
CMAKE_GENERATOR: "-G Ninja" # include -G if defined
BUILD_DIRECTORY: "build-in-docker" # build directory name
SOURCE_DIRECTORY: ".." # where cmake search source files from the build directory
TARGET: "check" # target to invoke
CLEAN: "OFF" # whether to rm -rf * in build directory before running cmake
TESTS: "ON" # build and run unit tests
stages:
- build
......@@ -26,6 +33,9 @@ stages:
- mkdir -p $BUILD_DIRECTORY
- cd $BUILD_DIRECTORY
- if [ "$CLEAN" == "ON" ]; then rm -rf ./*; fi
- conan remote add $CONAN_REMOTE_NAME $CONAN_REMOTE_URL
- conan user -p $CONAN_API_KEY -r $CONAN_REMOTE_NAME $CONAN_USER
- conan remote list
- conan install ..
--build missing
-pr $CONAN_PROFILE
......@@ -35,6 +45,15 @@ stages:
- cmake --build .
--target $TARGET
--config $RELEASE_TYPE
- cd ..
- conan create
--build missing
-pr $CONAN_PROFILE
. $NAME/$VERSION@$CONAN_USER/$TAG-$CONAN_PROFILE
- conan upload
--all
-r $CONAN_REMOTE_NAME
$NAME/$VERSION@$CONAN_USER/$TAG-$CONAN_PROFILE
distcheck-linux-gcc-release:
<<: *distcheck-basic-linux
......
......@@ -65,5 +65,6 @@
"codecvt": "cpp",
"algorithm": "cpp",
"__nullptr": "cpp"
}
},
"python.pythonPath": "${workspaceFolder}/venv/bin/python"
}
\ No newline at end of file
......@@ -4,15 +4,15 @@ cmake_minimum_required(VERSION 3.8.2)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
add_executable(test test.cpp)
target_compile_features(test INTERFACE cxx_std_17)
target_link_libraries(test PRIVATE CONAN_PKG::gtest-constexpr-ext)
add_executable(test_package test_package.cpp)
target_compile_features(test_package INTERFACE cxx_std_17)
target_link_libraries(test_package PRIVATE CONAN_PKG::gtest-constexpr-ext)
find_package(Threads REQUIRED)
target_link_libraries(test PRIVATE Threads::Threads)
target_link_libraries(test_package PRIVATE Threads::Threads)
enable_testing()
add_test(NAME test
add_test(NAME test_package
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
COMMAND test)
COMMAND test_package)
......@@ -20,4 +20,4 @@ class GtestconstexprextTestConan(ConanFile):
def test(self):
if not tools.cross_building(self.settings):
os.chdir("bin")
self.run(".%stest" % os.sep)
self.run(".%stest_package" % os.sep)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment