-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
29 lines (23 loc) · 899 Bytes
/
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
cmake_minimum_required(VERSION 2.8.0)
project(visibility)
set(visibility_headers
${PROJECT_SOURCE_DIR}/visibility/floats.hpp
${PROJECT_SOURCE_DIR}/visibility/vector2.hpp
${PROJECT_SOURCE_DIR}/visibility/primitives.hpp
${PROJECT_SOURCE_DIR}/visibility/visibility.hpp
)
set(all_tests
${PROJECT_SOURCE_DIR}/tests/catch.hpp
${PROJECT_SOURCE_DIR}/tests/main.cpp
${PROJECT_SOURCE_DIR}/tests/vector2_test.cpp
${PROJECT_SOURCE_DIR}/tests/primitives_test.cpp
${PROJECT_SOURCE_DIR}/tests/visibility_test.cpp
)
include_directories(${PROJECT_SOURCE_DIR})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Werror -Wextra")
endif()
# Create project in MSVC
add_library(visibility STATIC ${visibility_headers})
set_target_properties(visibility PROPERTIES LINKER_LANGUAGE CXX)
add_executable(tests ${all_tests})