Dont include tests in conan package.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-02-26 13:38:18 +01:00
parent 5d620e8ee7
commit 22ab01b5a2
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 10 additions and 5 deletions

View File

@ -9,16 +9,21 @@ add_library(Arbutils SHARED ${SRC_FILES})
set_target_properties(Arbutils PROPERTIES LINKER_LANGUAGE CXX)
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")
add_executable(ArbutilsTests ${TEST_FILES} extern/catch.hpp)
target_link_libraries(ArbutilsTests Arbutils)
if (NOT DEFINED CONAN_EXPORTED)
add_executable(ArbutilsTests ${TEST_FILES} extern/catch.hpp)
target_link_libraries(ArbutilsTests Arbutils)
endif()
if (WINDOWS)
MESSAGE(WARNING, "Using Windows Build.")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition")
# Statically link libraries we need in Windows.
target_link_libraries(Arbutils -static -static-libgcc -static-libstdc++)
if (NOT DEFINED CONAN_EXPORTED)
target_link_libraries(ArbutilsTests -static -static-libgcc -static-libstdc++)
endif()
endif (WINDOWS)
target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD)
if (NOT DEFINED CONAN_EXPORTED)
target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD)
endif()