blob: ce33fcdc94f810e8e6cc7760704a5606d48ff326 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
cmake_minimum_required(VERSION 3.3)
project(TestFindOctave CXX)
enable_testing()
find_package(Octave REQUIRED COMPONENTS Development Interpreter)
add_definitions(-DCMAKE_EXPECTED_Octave_VERSION=${Octave_VERSION})
add_executable(test_tgt main.cpp)
target_link_libraries(test_tgt Octave::Octave)
add_test(NAME test_tgt COMMAND test_tgt)
add_test(NAME test_tgt_exe
COMMAND Octave::Interpreter -q --eval "runtests('.')"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(test_var main.cpp)
target_include_directories(test_var PRIVATE ${Octave_INCLUDE_DIRS})
target_link_libraries(test_var PRIVATE ${Octave_LIBRARIES})
add_test(NAME test_var COMMAND test_var)
|