michalkielan / MatrixLibs

Small matrix library, written C++11
Mozilla Public License 2.0
1 stars 2 forks source link

cmake instead of Makefile, separate test for each component #14

Closed michalkielan closed 7 years ago

michalkielan commented 7 years ago

@JaroslawWiosna

JaroslawWiosna commented 7 years ago

fe2bf9e CMakeLists.txt insted of Makefile.

What do you mean by separate test for each component? What is a component? Perhaps you want me to create separate file for every single one of 28 tests? If so, for every test man should add the following 3 lines in CMakeLists.txt

project (test_No001)
add_executable(test_No001 ./tests/test_No001.cpp)
target_link_libraries(test_No001 gtest pthread)

project (test_No002)
add_executable(test_No002 ./tests/test_No002.cpp)
target_link_libraries(test_No002 gtest pthread)

project (test_No003)
add_executable(test_No003 ./tests/test_No003.cpp)
target_link_libraries(test_No003 gtest pthread)

and in .travis.yml

script:
    - ./cmake_clean.sh
    - cmake .
    - make
    - ./test_No001
    - ./test_No002
    - ./test_No003

Is my understanding is correct? Please, inform me if this is what you want me to do.

JaroslawWiosna commented 7 years ago

BTW, my local test were successful, but Travis returned an error which is very weird...

I am using

➜ MatrixLibs git:(cmake) ✗ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

➜ MatrixLibs git:(cmake) ✗ g++ --version g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

JaroslawWiosna commented 7 years ago

Pull request #16