FCF_TEST_IMPORT macro
Package: fcfTest
File: test.hpp
Available from version: 1.0.1
This macro is declared when importing fcfTest functions from a shared library (if you built fcfTest in a separate library) to inform the compiler that the functions should be imported.
It's best to declare this macro in the settings for CMake, Visual Studio, and other build systems.
Example: Connecting an fcfTest from an external shared library.
main.cpp:
Our application file
shared.cpp file:
Our shared library
#define FCF_TEST_EXPORT
#define FCF_TEST_IMPLEMENTATION
#include <fcfTest/test.hpp>
CMakeLists.txt file:
project(FcfTestProject)
# 1. Create a dynamic shared library
add_library(my_shared_lib SHARED shared.cpp)
# Specify include directories for the library
target_include_directories(my_shared_lib PRIVATE ../../..)
# 2. Create the application executable
add_executable(app main.cpp)
# Specify include directories for the application
target_include_directories(app PRIVATE ../../..)
# 3. Link the application with the created library
target_link_libraries(app PRIVATE my_shared_lib)
Output:
Performing the test: "OurPart" -> "OurGroup" -> "OurTest" ...
[SUCCESS] Test completed successfully (0.000`000`982 sec)
[SUCCESS] All tests were completed.
Tests: 1 passed, 0 failed, 0 skipped, 1 total
Duration: 0.000`000`982 sec
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.