-
Notifications
You must be signed in to change notification settings - Fork 40
/
CMakeLists.txt
63 lines (49 loc) · 1.47 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
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
61
62
63
cmake_minimum_required(VERSION 2.8)
project(Kvasir)
enable_testing()
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# using Clang
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using GCC
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic -Wold-style-cast -I ${CMAKE_CURRENT_SOURCE_DIR}/Lib/")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
# using Intel C++
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio C++
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /I\"${CMAKE_CURRENT_SOURCE_DIR}/Lib\"")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBRIGAND_NO_BOOST_SUPPORT ")
set(CMAKE_DEBUG_POSTFIX "d")
set ( MPL_GROUP
Lib/Mpl/Types.hpp
Lib/Mpl/Algorithm.hpp
Lib/Mpl/IntegralConstants.hpp
Lib/Mpl/Utility.hpp
)
set ( REGISTER_GROUP
Lib/Register/Apply.hpp
Lib/Register/AtomicFactories.hpp
Lib/Register/Exec.hpp
Lib/Register/Factories.hpp
Lib/Register/IsolatedFactories.hpp
Lib/Register/Register.hpp
Lib/Register/Seam.hpp
Lib/Register/Types.hpp
Lib/Register/Utility.hpp
)
add_library(Kvasir
${MPL_GROUP}
${REGISTER_GROUP}
)
SET_TARGET_PROPERTIES(Kvasir PROPERTIES LINKER_LANGUAGE CXX)
set(TestFiles
test/apply.cpp
test/usb.cpp
test/main.cpp
)
add_executable(KvasirTest ${TestFiles})
add_test(Kvasir KvasirTest)
install ( DIRECTORY ${PROJECT_SOURCE_DIR}/Lib
DESTINATION .
)