Skip to content

Commit

Permalink
VXL 2021-03-24 (188a98c0)
Browse files Browse the repository at this point in the history
Code extracted from:

    https://github.com/vxl/vxl.git

at commit 188a98c02efac9647e472485548e21915ae1912c (master).
  • Loading branch information
VXL Maintainers authored and dzenanz committed Mar 31, 2021
1 parent 1044055 commit 74eaa20
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions config/cmake/config/vxl_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ endmacro()
# VXL_INSTALL_INCLUDE_DIR if VXL_INSTALL_INCLUDE_DIR is
# not its default value; otherwise, the relative path in
# the vxl source tree is used.
# DISABLE_MSVC_MP Disable automatic addition of the "/MP" flag in MSVC
# builds. Avoids MSVC warning C5102: ignoring invalid
# command-line macro definition '/MP'
#
function( vxl_add_library )
cmake_parse_arguments(vxl_add
"" # options
"DISABLE_MSVC_MP" # options
"LIBRARY_NAME;HEADER_BUILD_DIR;HEADER_INSTALL_DIR" # oneValueArgs
"LIBRARY_SOURCES" # multiValueArgs
${ARGN} )
Expand All @@ -81,7 +84,9 @@ function( vxl_add_library )
list(LENGTH vxl_add_LIBRARY_SOURCES num_src_files)
if( ${num_src_files} GREATER 0 )
add_library(${vxl_add_LIBRARY_NAME} ${vxl_add_LIBRARY_SOURCES} )
if(MSVC) # This enables object-level build parallelism in VNL libraries for MSVC

# This enables object-level build parallelism in VNL libraries for MSVC
if(MSVC AND NOT vxl_add_DISABLE_MSVC_MP)
target_compile_definitions(${vxl_add_LIBRARY_NAME} PRIVATE " /MP ")
endif()

Expand Down
7 changes: 5 additions & 2 deletions v3p/netlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ set(netlib_sources
triangle.c triangle.h
)

vxl_add_library(LIBRARY_NAME ${VXL_LIB_PREFIX}netlib
LIBRARY_SOURCES ${netlib_sources})
vxl_add_library(
LIBRARY_NAME ${VXL_LIB_PREFIX}netlib
LIBRARY_SOURCES ${netlib_sources}
DISABLE_MSVC_MP
)

if(UNIX)
target_link_libraries( ${VXL_LIB_PREFIX}netlib m )
Expand Down

0 comments on commit 74eaa20

Please sign in to comment.