-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
35 lines (27 loc) · 1.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
### make sure the user is doing an our of source build:
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
message( FATAL_ERROR "In-source builds are not allowed. use cmake -H. -Bbuild instead to build in the build folder" )
endif()
###
cmake_minimum_required (VERSION 3.16)
project (PANOCPP)
enable_language(CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include_directories("${CMAKE_SOURCE_DIR}/lib/catch2")
include_directories("${CMAKE_SOURCE_DIR}/include")
include_directories("${CMAKE_SOURCE_DIR}/test")
# Test the functionality
enable_testing()
add_executable(panocTests test/PanocTests.cpp)
add_executable(vectorAlgebraTests test/VectorAlgebraTests.cpp)
add_executable(proxOperatorTests test/proxOperatorTest.cpp)
set_property(TARGET panocTests PROPERTY CXX_STANDARD 17)
set_property(TARGET vectorAlgebraTests PROPERTY CXX_STANDARD 17)
set_property(TARGET proxOperatorTests PROPERTY CXX_STANDARD 17)
if(NOT MSVC)
target_link_libraries(panocTests m) # link with the math lib, some toolchains need this
endif()
add_test(NAME panocTests COMMAND panocTests)
add_test(NAME vectorAlgebraTests COMMAND vectorAlgebraTests)
add_test(NAME proxOperatorTests COMMAND proxOperatorTests)