mirror of
https://github.com/Z3Prover/z3
synced 2026-02-15 13:21:50 +00:00
[CMake] Move CMake files into their intended location so the
`contrib/cmake/bootstrap.py` script no longer needs to be executed. The previous location of the CMake files was a compromise proposed by @agurfinkel in #461. While this has served us well (allowing progress to be made) over time limitations of this approach have appeared. The main problem is that doing many git operations (e.g. pull, rebase) means the CMake files don't get updated unless the user remembers to run the script. This can lead to broken and confusing build system behaviour. This commit only does the file moving and necessary changes to `.gitignore`. Other changes will be done in subsequent commits.
This commit is contained in:
parent
f0fa439c48
commit
4b517b96df
97 changed files with 0 additions and 11 deletions
17
cmake/z3_append_linker_flag_list_to_target.cmake
Normal file
17
cmake/z3_append_linker_flag_list_to_target.cmake
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# The LINK_FLAGS property of a target in CMake is unfortunately a string and
|
||||
# not a list. This function takes a list of linker flags and iterates through
|
||||
# them to append them as strings to the ``LINK_FLAGS`` property of
|
||||
# the specified target.
|
||||
# E.g.
|
||||
# z3_append_linker_flag_list_to_target(mytarget "-fopenmp" "-static")
|
||||
function(z3_append_linker_flag_list_to_target target)
|
||||
if (NOT (TARGET "${target}"))
|
||||
message(FATAL_ERROR "Specified target \"${target}\" is not a target")
|
||||
endif()
|
||||
foreach(flag ${ARGN})
|
||||
#message(STATUS "Appending link flag \"${flag}\" to target ${target}")
|
||||
# Note that space inside the quoted string is required so that the flags
|
||||
# are space separated.
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${flag}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
Loading…
Add table
Add a link
Reference in a new issue