Absolute path in Test.cmake for consistency. Allowed git version checking

also in cross-compiles
This commit is contained in:
Andreas Schönle 2017-05-10 08:29:15 +02:00
parent 123977f106
commit 8f6b0ded7e
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ endif()
SET(MAJOR_VERSION 1)
IF (${VERSION}.x STREQUAL ".x")
IF (MSVC)
IF ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
message("windows: Extracting git software version")
execute_process(COMMAND powershell "(git rev-list --branches HEAD | Measure-Object -line).Lines" OUTPUT_VARIABLE GIT_VERSION WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
ELSE()

View File

@ -74,7 +74,7 @@
add_library(tester_sharedlib SHARED ${DIR_UNIT_TEST}/tester_sharedlib.h ${DIR_UNIT_TEST}/tester_sharedlib.cpp)
target_link_libraries(tester_sharedlib ${G3LOG_LIBRARY})
add_executable(test_dynamic_loaded_shared_lib ../test_main/test_main.cpp ${DIR_UNIT_TEST}/test_linux_dynamic_loaded_sharedlib.cpp)
add_executable(test_dynamic_loaded_shared_lib ${g3log_SOURCE_DIR}/test_main/test_main.cpp ${DIR_UNIT_TEST}/test_linux_dynamic_loaded_sharedlib.cpp)
set_target_properties(test_dynamic_loaded_shared_lib PROPERTIES COMPILE_DEFINITIONS "GTEST_HAS_TR1_TUPLE=0")
set_target_properties(test_dynamic_loaded_shared_lib PROPERTIES COMPILE_DEFINITIONS "GTEST_HAS_RTTI=0")
target_link_libraries(test_dynamic_loaded_shared_lib ${G3LOG_LIBRARY} -ldl gtest_170_lib )