File tree 3 files changed +30
-43
lines changed
3 files changed +30
-43
lines changed Original file line number Diff line number Diff line change
1
+ build /
1
2
* .o
2
3
* .swp
3
4
* .log
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.10)
2
+
3
+ project (Bint
4
+ VERSION "0.1.0"
5
+ DESCRIPTION "Bint is an arbitrary-precision arithmetic library."
6
+ LANGUAGES CXX
7
+ )
8
+
9
+ enable_testing ()
10
+
11
+ set (CMAKE_CXX_STANDARD 17)
12
+ set (CMAKE_CXX_EXTENSIONS OFF )
13
+ add_compile_options (-Wall -Wextra -pedantic)
14
+
15
+ set (BINT_SRC Bint.cpp Bint.h)
16
+ set (MATH_SRC Math.cpp Math.h)
17
+ add_library (shareobjects OBJECT ${BINT_SRC} ${MATH_SRC} )
18
+
19
+ add_executable (main main.cpp $<TARGET_OBJECTS:shareobjects>)
20
+ add_executable (main-fast main.cpp ${BINT_SRC} ${MATH_SRC} )
21
+ set_target_properties (main-fast PROPERTIES COMPILE_FLAGS -Ofast)
22
+
23
+ aux_source_directory (tests TESTS)
24
+ foreach (tstfile ${TESTS} )
25
+ string (REGEX MATCH "\/ (.*)\\ .[^.]*$" dummy ${tstfile} )
26
+ add_executable (test -${CMAKE_MATCH_1} ${tstfile} $<TARGET_OBJECTS:shareobjects>)
27
+ add_test (NAME tst-${CMAKE_MATCH_1} COMMAND ./test -${CMAKE_MATCH_1} )
28
+ endforeach ()
29
+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments