diff --git a/.github/workflows/ubuntu20.yml b/.github/workflows/ubuntu20.yml index 090fe9c..68502fe 100644 --- a/.github/workflows/ubuntu20.yml +++ b/.github/workflows/ubuntu20.yml @@ -24,4 +24,6 @@ jobs: ctest --output-on-failure && cmake --install . && cd ../tests/installation_tests/find && + mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build . && + cd ../../issue72_installation && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build . \ No newline at end of file diff --git a/.github/workflows/vs16-ci.yml b/.github/workflows/vs16-ci.yml index f3d7cd8..94abcfd 100644 --- a/.github/workflows/vs16-ci.yml +++ b/.github/workflows/vs16-ci.yml @@ -24,4 +24,6 @@ jobs: ctest --output-on-failure && cmake --install . && cd ../tests/installation_tests/find && + mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build . + cd ../../issue72_installation && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build . \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 713c663..e370559 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -62,3 +62,4 @@ if (FASTFLOAT_EXHAUSTIVE) fast_float_add_cpp_test(random64) endif(FASTFLOAT_EXHAUSTIVE) +add_subdirectory(build_tests) \ No newline at end of file diff --git a/tests/build_tests/CMakeLists.txt b/tests/build_tests/CMakeLists.txt new file mode 100644 index 0000000..da762eb --- /dev/null +++ b/tests/build_tests/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(issue72) \ No newline at end of file diff --git a/tests/build_tests/issue72/CMakeLists.txt b/tests/build_tests/issue72/CMakeLists.txt new file mode 100644 index 0000000..efe39a2 --- /dev/null +++ b/tests/build_tests/issue72/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(issue72 main.cpp foo.cpp) +target_link_libraries(issue72 PUBLIC fast_float) \ No newline at end of file diff --git a/tests/build_tests/issue72/foo.cpp b/tests/build_tests/issue72/foo.cpp new file mode 100644 index 0000000..cbe2412 --- /dev/null +++ b/tests/build_tests/issue72/foo.cpp @@ -0,0 +1,2 @@ +#include "test.h" +void foo() { } \ No newline at end of file diff --git a/tests/build_tests/issue72/main.cpp b/tests/build_tests/issue72/main.cpp new file mode 100644 index 0000000..3d46c0a --- /dev/null +++ b/tests/build_tests/issue72/main.cpp @@ -0,0 +1,2 @@ +#include "test.h" +int main() { return 0; } \ No newline at end of file diff --git a/tests/build_tests/issue72/test.h b/tests/build_tests/issue72/test.h new file mode 100644 index 0000000..550a31b --- /dev/null +++ b/tests/build_tests/issue72/test.h @@ -0,0 +1,2 @@ +#pragma once +#include "fast_float/fast_float.h" \ No newline at end of file diff --git a/tests/installation_tests/issue72_installation/CMakeLists.txt b/tests/installation_tests/issue72_installation/CMakeLists.txt new file mode 100644 index 0000000..da72433 --- /dev/null +++ b/tests/installation_tests/issue72_installation/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_simdjson_install VERSION 0.1.0 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +find_package(FastFloat REQUIRED) + + + +file(WRITE test.h " +#pragma once +#include \"fast_float/fast_float.h\"") + +file(WRITE main.cpp " +#include \"test.h\" +int main() { return 0; }") + +file(WRITE foo.cpp " +#include \"test.h\" +void foo() { }") + +add_executable(issue72 main.cpp main.cpp) +target_link_libraries(issue72 PUBLIC FastFloat::fast_float) \ No newline at end of file