3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-25 04:26:00 +00:00

Don't append ${OpenMP_CXX_FLAGS} to Z3_DEPENDENT_LIBS. This is wrong

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``.
This commit is contained in:
Dan Liew 2016-02-29 20:53:57 +00:00
parent 7ac9172600
commit ca6c41e411
6 changed files with 13 additions and 1 deletions

View file

@ -41,6 +41,7 @@ target_compile_options(shell PRIVATE ${Z3_COMPONENT_CXX_FLAGS})
target_include_directories(shell PRIVATE ${Z3_COMPONENT_EXTRA_INCLUDE_DIRS})
target_link_libraries(shell PRIVATE ${Z3_DEPENDENT_LIBS})
z3_add_component_dependencies_to_target(shell ${shell_expanded_deps})
set_property(TARGET shell APPEND PROPERTY LINK_FLAGS ${Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS})
install(TARGETS shell
RUNTIME DESTINATION "${Z3_INSTALL_BIN_DIR}"
)