File tree 2 files changed +31
-3
lines changed 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 1
1
.idea /
2
+
3
+ # cmake products
2
4
cmake-build-debug /
5
+ Boost.Real.build /
6
+ Boost.Real.xcodeproj /
7
+ CMakeCache.txt
8
+ CMakeFiles /
9
+ CMakeScripts /
10
+ CTestTestfile.cmake
11
+ cmake_install.cmake
Original file line number Diff line number Diff line change @@ -3,9 +3,21 @@ project(Boost.Real)
3
3
set (Boost.Real 1)
4
4
set (Boost.Real 0)
5
5
6
- set ( CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++11" )
6
+ add_library (Boost.Real INTERFACE )
7
7
8
- include_directories (include )
8
+ # Check for standard to use
9
+ include (CheckCXXCompilerFlag)
10
+ check_cxx_compiler_flag(-std=c++17 HAVE_FLAG_STD_CXX17)
11
+ if (HAVE_FLAG_STD_CXX17)
12
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic --std=c++17" )
13
+ else ()
14
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic --std=c++1z" )
15
+ endif ()
16
+
17
+ #Detect Boost.Test framework
18
+ find_package (Boost COMPONENTS unit_test_framework REQUIRED)
19
+
20
+ include_directories (include ${Boost_INCLUDE_DIRS} )
9
21
10
22
# Unit tests
11
23
enable_testing ()
@@ -14,4 +26,11 @@ foreach(testSrc ${TestSources})
14
26
get_filename_component (testName ${testSrc} NAME_WE )
15
27
add_executable (${testName} ${testSrc} )
16
28
add_test (${testName} ${testName} )
17
- endforeach (testSrc)
29
+ endforeach (testSrc)
30
+
31
+ #Library Headers
32
+ add_executable (Boost.Real_headers include )
33
+ set_target_properties (Boost.Real_headers PROPERTIES
34
+ EXCLUDE_FROM_ALL TRUE
35
+ EXCLUDE_FROM_DEFAULT_BUILD TRUE
36
+ LINKER_LANGUAGE CXX)
You can’t perform that action at this time.
0 commit comments