summaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
blob: 89e7c47b80bdda68363a1e1b5d3d15732b5a4969 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# vectors example
add_executable(vec_example
    vec_example.cpp
)

target_compile_options(vec_example
    PRIVATE
        $<$<CXX_COMPILER_ID:GNU>:
            -pedantic -Wall -Wextra -Wcast-qual -Wcast-align -Wpointer-arith
            -Winit-self -Wshadow -Wswitch-enum -Wredundant-decls -Wfloat-equal
            -Wundef -Wvla -Wconversion -Wstrict-aliasing
        >
        $<$<CXX_COMPILER_ID:MSVC>:/W4>
)

target_compile_features(vec_example
    PRIVATE
        cxx_std_17
)

target_include_directories(vec_example
    PRIVATE
        ${MM_INCLUDE_DIRS}
)

target_link_libraries(vec_example
    PRIVATE
        MM::mm
)


# matrix example
add_executable(matrix_example
    matrix_example.cpp
)

target_compile_options(matrix_example
    PRIVATE
        $<$<CXX_COMPILER_ID:GNU>:
            -pedantic -Wall -Wextra -Wcast-qual -Wcast-align -Wpointer-arith
            -Winit-self -Wshadow -Wswitch-enum -Wredundant-decls -Wfloat-equal
            -Wundef -Wvla -Wconversion -Wstrict-aliasing
        >
        $<$<CXX_COMPILER_ID:MSVC>:/W4>
)

target_compile_features(matrix_example
    PRIVATE
        cxx_std_17
)

target_include_directories(matrix_example
    PRIVATE
        ${MM_INCLUDE_DIRS}
)

target_link_libraries(matrix_example
    PRIVATE
        MM::mm
)