Commit ef92db90 authored by Michaël Roynard's avatar Michaël Roynard

CMake forbid using test as a target name

parent 73c6986d
Pipeline #2088 passed with stage
in 2 minutes and 46 seconds
......@@ -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