mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 01:54:08 +00:00
because this is passed to ``target_link_libraries()``. It just so happens that ``target_link_libraries()`` will interpret arguments starting with a dash as a flag to pass to the linker (i.e. in this case ``-fopenmp``). However in the case of MSVC that flag is ``/openmp`` which is the interpreted as a file path which will lead to a linker failure later because the linker can't find the file ``\openmp.obj``.
5 lines
271 B
CMake
5 lines
271 B
CMake
add_executable(c_example EXCLUDE_FROM_ALL test_capi.c)
|
|
target_link_libraries(c_example PRIVATE libz3)
|
|
target_include_directories(c_example PRIVATE "${CMAKE_SOURCE_DIR}/src/api")
|
|
set_property(TARGET c_example APPEND PROPERTY LINK_FLAGS ${Z3_DEPENDENT_EXTRA_C_LINK_FLAGS})
|