diff --git a/build-common/LICENSE.txt b/build-common/LICENSE.txt new file mode 100644 index 0000000..2b6760e --- /dev/null +++ b/build-common/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011-2015 Travis Abbott and David E. Larson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/build-common/README.md b/build-common/README.md new file mode 100644 index 0000000..10124c2 --- /dev/null +++ b/build-common/README.md @@ -0,0 +1,2 @@ +# build-common +Common build scripts used in C/C++ projects. Intended to make compiling with CMake and handling dependencies slightly easier. diff --git a/build-common/cmake/TestHelper.cmake b/build-common/cmake/TestHelper.cmake index 712027d..37dbad0 100644 --- a/build-common/cmake/TestHelper.cmake +++ b/build-common/cmake/TestHelper.cmake @@ -34,6 +34,7 @@ set_property(TARGET gtest_main PROPERTY IMPORTED_LOCATION ${GTEST_MAIN_LIBRARY}) macro(add_unit_tests test_name) set(src_files ${ARGN}) add_executable(${test_name} ${src_files} ${COMMON_SOURCES}) + set_target_properties(${test_name} PROPERTIES COMPILE_FLAGS -DGTEST_USE_OWN_TR1_TUPLE=1) target_link_libraries(${test_name} ${TEST_LIBS} gtest gtest_main ${CMAKE_THREAD_LIBS_INIT}) add_dependencies(${test_name} gtest160) if($ENV{BC_UNIT_TEST_VG}) @@ -50,6 +51,7 @@ endmacro(add_unit_tests test_name src_files) macro(def_test testName) add_executable(Test${testName} Test${testName}.cpp ${COMMON_SOURCES}) + set_target_properties(${test_name} PROPERTIES COMPILE_FLAGS -DGTEST_USE_OWN_TR1_TUPLE=1) target_link_libraries(Test${testName} ${TEST_LIBS} gtest gtest_main ${CMAKE_THREAD_LIBS_INIT}) add_dependencies(Test${testName} gtest160) if($ENV{BC_UNIT_TEST_VG})