File tree Expand file tree Collapse file tree 3 files changed +47
-26
lines changed
tests/installation_tests/find Expand file tree Collapse file tree 3 files changed +47
-26
lines changed Original file line number Diff line number Diff line change @@ -15,20 +15,13 @@ jobs:
1515 # - {cxx: , arch: -DCMAKE_CXX_FLAGS="-m32"} # default=gcc9
1616 steps :
1717 - uses : actions/checkout@v2
18- - name : Setup cmake
19- 20- with :
21- cmake-version : ' 3.11.x'
22- # - name: install older compilers
23- # run: |
24- # sudo -E dpkg --add-architecture i386
25- # sudo -E apt-get update
26- # sudo -E apt-get install -y g++-8 g++-8-multilib g++-multilib linux-libc-dev:i386 libc6:i386 libc6-dev:i386 libc6-dbg:i386
27- - name : Prepare build dir
28- run : mkdir build
29- - name : Configure
30- run : cd build && cmake ${{matrix.cxx}} ${{matrix.arch}} -DFASTFLOAT_TEST=ON ..
31- - name : Build
32- run : cmake --build build
33- - name : Run basic tests
34- run : cd build && ctest --output-on-failure -R basictest
18+ - name : Use cmake
19+ run : |
20+ mkdir build &&
21+ cd build &&
22+ cmake ${{matrix.cxx}} ${{matrix.arch}} -DFASTFLOAT_TEST=ON -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
23+ cmake --build . &&
24+ ctest --output-on-failure &&
25+ cmake --install . &&
26+ cd ../tests/installation_tests/find &&
27+ mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build .
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ jobs:
1515 steps :
1616 - name : checkout
1717 uses : actions/checkout@v2
18- - name : Configure
18+ - name : Use cmake
1919 run : |
20- mkdir build
21- cd build && cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_TEST=ON ..
22- - name : Build
23- run : cmake --build build --config Release --parallel
24- - name : Run basic tests
25- run : |
26- cd build
27- ctest -C Release --output-on-failure -R basictest
20+ mkdir build &&
21+ cd build &&
22+ cmake ${{matrix.cxx}} ${{matrix.arch}} -DFASTFLOAT_TEST=ON -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
23+ cmake --build . &&
24+ ctest --output-on-failure &&
25+ cmake --install . &&
26+ cd ../tests/installation_tests/find &&
27+ mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build .
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.15)
2+
3+ project (test_simdjson_install VERSION 0.1.0 LANGUAGES CXX)
4+
5+ set (CMAKE_CXX_STANDARD 17)
6+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
7+
8+ find_package (FastFloat REQUIRED)
9+
10+
11+
12+ file (WRITE main.cpp "
13+ #include \" fast_float/fast_float.h\"
14+ #include <iostream>
15+
16+ int main() {
17+ const std::string input = \" 3.1416 xyz \" ;
18+ double result;
19+ auto answer = fast_float::from_chars(input.data(), input.data()+input.size(), result);
20+ if(answer.ec != std::errc()) { std::cerr << \" parsing failure\\ n\" ; return EXIT_FAILURE; }
21+ std::cout << \" parsed the number \" << result << std::endl;
22+ return EXIT_SUCCESS;
23+ }" )
24+
25+
26+
27+ add_executable (repro main.cpp)
28+ target_link_libraries (repro PUBLIC FastFloat::fast_float)
You can’t perform that action at this time.
0 commit comments