2017-02-17 18:10:03 +01:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
project(multi_array)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++11 --pedantic")
|
|
|
|
|
2017-03-23 21:05:40 +01:00
|
|
|
enable_testing()
|
|
|
|
|
2017-02-17 18:10:03 +01:00
|
|
|
find_package( GTest REQUIRED )
|
|
|
|
if(GTest_FOUND)
|
|
|
|
include_directories(${GTEST_INCLUDE_DIRS})
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "GTest not found")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include_directories(src)
|
|
|
|
|
2017-05-30 17:49:18 +02:00
|
|
|
#add_executable(utest src/unit_test.cc)
|
|
|
|
#target_link_libraries(utest ${GTEST_BOTH_LIBRARIES})
|
|
|
|
#add_test(NAME utest COMMAND utest)
|
|
|
|
|
|
|
|
add_executable(iutest src/index_unit_test.cc)
|
|
|
|
target_link_libraries(iutest ${GTEST_BOTH_LIBRARIES})
|
|
|
|
add_test(NAME iutest COMMAND utest)
|
2017-02-17 18:10:03 +01:00
|
|
|
|
|
|
|
#install(TARGETS testm DESTINATION install)
|
|
|
|
|
|
|
|
set(CMAKE_INSTALL_PREFIX ..)
|