Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Michaël Roynard
gtest-constexpr-ext
Commits
4f7c100c
Commit
4f7c100c
authored
Jun 06, 2018
by
Michaël Roynard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Fix pthread dependency See merge request
!4
parents
58a3e4ab
31d25c06
Pipeline
#2036
passed with stage
in 1 minute and 29 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
9 deletions
+18
-9
conanfile.py
conanfile.py
+1
-1
include/CMakeLists.txt
include/CMakeLists.txt
+3
-0
test/CMakeLists.txt
test/CMakeLists.txt
+3
-1
test_package/CMakeLists.txt
test_package/CMakeLists.txt
+9
-5
test_package/conanfile.py
test_package/conanfile.py
+2
-2
test_package/test.cpp
test_package/test.cpp
+0
-0
No files found.
conanfile.py
View file @
4f7c100c
...
...
@@ -18,7 +18,7 @@ class GtestconstexprextConan(ConanFile):
git
.
clone
(
self
.
url
)
def
build
(
self
):
cmake
=
CMake
(
self
)
cmake
=
CMake
(
self
,
generator
=
"Ninja"
)
cmake
.
configure
()
cmake
.
build
()
cmake
.
test
()
...
...
include/CMakeLists.txt
View file @
4f7c100c
...
...
@@ -5,6 +5,9 @@ target_compile_features(Gtest-constexpr-ext INTERFACE cxx_std_17)
target_include_directories
(
Gtest-constexpr-ext INTERFACE
${
GTEST_CONSTEXPR_EXT_INCLUDE_DIR
}
)
target_link_libraries
(
Gtest-constexpr-ext INTERFACE CONAN_PKG::gtest
)
FIND_PACKAGE
(
Threads REQUIRED
)
target_link_libraries
(
Gtest-constexpr-ext INTERFACE Threads::Threads
)
# dummy static project not linked anywere needed so that a vcxproj is generated with the sources in the solution
set_property
(
GLOBAL PROPERTY USE_FOLDERS ON
)
set
(
GTEST_CONSTEXPR_EXT_SOURCES
...
...
test/CMakeLists.txt
View file @
4f7c100c
...
...
@@ -16,7 +16,8 @@ macro(add_unit_test Executable Source)
target_compile_options
(
test_
${
Executable
}
PRIVATE -Wno-unused-private-field
)
endif
()
target_link_libraries
(
Gtest-constexpr-ext INTERFACE CONAN_PKG::gtest
)
target_link_libraries
(
test_
${
Executable
}
PRIVATE CONAN_PKG::gtest
)
target_link_libraries
(
test_
${
Executable
}
PRIVATE Threads::Threads
)
add_dependencies
(
tests-compile test_
${
Executable
}
)
endmacro
(
add_unit_test
)
...
...
@@ -25,6 +26,7 @@ option(WITH_TESTS "Compile and run tests" ON)
if
(
WITH_TESTS
)
FIND_PACKAGE
(
Threads REQUIRED
)
add_subdirectory
(
gtest-constexpr-ext
)
endif
(
WITH_TESTS
)
test_package/CMakeLists.txt
View file @
4f7c100c
...
...
@@ -4,11 +4,15 @@ cmake_minimum_required(VERSION 3.8.2)
include
(
${
CMAKE_BINARY_DIR
}
/conanbuildinfo.cmake
)
conan_basic_setup
(
TARGETS
)
add_executable
(
example example.cpp
)
target_link_libraries
(
example PRIVATE CONAN_PKG::gtest-constexpr-ext
)
target_compile_features
(
example INTERFACE cxx_std_17
)
add_executable
(
test test.cpp
)
target_compile_features
(
test INTERFACE cxx_std_17
)
target_link_libraries
(
test PRIVATE CONAN_PKG::gtest-constexpr-ext
)
FIND_PACKAGE
(
Threads REQUIRED
)
target_link_libraries
(
test PRIVATE Threads::Threads
)
enable_testing
()
add_test
(
NAME
example
add_test
(
NAME
test
WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin
COMMAND
example
)
COMMAND
test
)
test_package/conanfile.py
View file @
4f7c100c
...
...
@@ -8,7 +8,7 @@ class GtestconstexprextTestConan(ConanFile):
generators
=
"cmake"
def
build
(
self
):
cmake
=
CMake
(
self
)
cmake
=
CMake
(
self
,
generator
=
"Ninja"
)
cmake
.
configure
()
cmake
.
build
()
...
...
@@ -20,4 +20,4 @@ class GtestconstexprextTestConan(ConanFile):
def
test
(
self
):
if
not
tools
.
cross_building
(
self
.
settings
):
os
.
chdir
(
"bin"
)
self
.
run
(
".%s
example
"
%
os
.
sep
)
self
.
run
(
".%s
test
"
%
os
.
sep
)
test_package/
example
.cpp
→
test_package/
test
.cpp
View file @
4f7c100c
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment