From 4bf8e372b950699285ec2f59c437483240cce01c Mon Sep 17 00:00:00 2001 From: liaogang Date: Sat, 13 May 2017 10:59:56 +0800 Subject: [PATCH] Add Google style conventions to Majel --- .travis.yml | 1 + paddle/majel/CMakeLists.txt | 2 +- paddle/majel/{place.cpp => place.cc} | 0 paddle/majel/test/CMakeLists.txt | 3 ++- paddle/majel/test/{place_test.cpp => place_test.cc} | 0 paddle/majel/test/test_framework.cpp | 6 ------ 6 files changed, 4 insertions(+), 8 deletions(-) rename paddle/majel/{place.cpp => place.cc} (100%) rename paddle/majel/test/{place_test.cpp => place_test.cc} (100%) delete mode 100644 paddle/majel/test/test_framework.cpp diff --git a/.travis.yml b/.travis.yml index 865e21f046b..d73fd39aa7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ addons: - python2.7-dev - python-numpy - python-wheel + - libboost-dev - curl - swig - graphviz diff --git a/paddle/majel/CMakeLists.txt b/paddle/majel/CMakeLists.txt index 0c91fa72da4..baa3bb9e914 100644 --- a/paddle/majel/CMakeLists.txt +++ b/paddle/majel/CMakeLists.txt @@ -21,7 +21,7 @@ else() endif() ########################### Build Majel ############################# -set(MAJEL_CXX_FILES place.cpp) +set(MAJEL_CXX_FILES place.cc) set(MAJEL_CUDA_FILES "") if(CUDA_FOUND) diff --git a/paddle/majel/place.cpp b/paddle/majel/place.cc similarity index 100% rename from paddle/majel/place.cpp rename to paddle/majel/place.cc diff --git a/paddle/majel/test/CMakeLists.txt b/paddle/majel/test/CMakeLists.txt index 0cc7103b039..46da6ff89b4 100644 --- a/paddle/majel/test/CMakeLists.txt +++ b/paddle/majel/test/CMakeLists.txt @@ -1,10 +1,11 @@ -file(GLOB_RECURSE ALL_TEST_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.cpp" "*.cc") +file(GLOB_RECURSE ALL_TEST_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.cc") add_executable(majel_tests ${ALL_TEST_FILES}) add_dependencies(majel_tests majel) target_link_libraries(majel_tests ${Boost_LIBRARIES} ${GTEST_LIBRARIES} + ${GTEST_MAIN_LIBRARIES} majel ) add_test(majel_tests majel_tests) diff --git a/paddle/majel/test/place_test.cpp b/paddle/majel/test/place_test.cc similarity index 100% rename from paddle/majel/test/place_test.cpp rename to paddle/majel/test/place_test.cc diff --git a/paddle/majel/test/test_framework.cpp b/paddle/majel/test/test_framework.cpp deleted file mode 100644 index 443e2dbb3f2..00000000000 --- a/paddle/majel/test/test_framework.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "gtest/gtest.h" - -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} -- GitLab