Fix build errors in examples/tests
parent
7e5c5c21ac
commit
7aeb153da8
|
@ -47,3 +47,17 @@ if(GTSAM_BUILD_METIS_EXECUTABLES)
|
|||
endif()
|
||||
|
||||
set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE)
|
||||
# Export macros assumed in metis public headers to clients of the library.
|
||||
# This was added to solve MSVC build errors.
|
||||
if (TARGET metis AND GKlib_COPTIONS)
|
||||
# Remove (possibly) duplicated symbols:
|
||||
string(REPLACE -DLINUX "" GKlib_COPTIONS ${GKlib_COPTIONS})
|
||||
string(REPLACE -DWIN32 "" GKlib_COPTIONS ${GKlib_COPTIONS})
|
||||
string(REPLACE -DNDEBUG2 "" GKlib_COPTIONS ${GKlib_COPTIONS})
|
||||
string(REPLACE -DNDEBUG "" GKlib_COPTIONS ${GKlib_COPTIONS})
|
||||
string(REPLACE -pedantic "" GKlib_COPTIONS ${GKlib_COPTIONS})
|
||||
string(REPLACE -std=c99 "" GKlib_COPTIONS ${GKlib_COPTIONS})
|
||||
separate_arguments(GKlib_COPTIONS)
|
||||
# Declare those flags as to-be-imported in "client libraries", i.e. "gtsam"
|
||||
target_compile_options(metis INTERFACE ${GKlib_COPTIONS})
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue