Commit 882118ff authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot

Merge topic 'capstone'

8eee83bd Add capstone and cubit to the superbuild
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: David Thompson's avatarDavid Thompson <david.thompson@kitware.com>
Merge-request: !500
parents fdaba571 8eee83bd
Pipeline #136917 running with stage
......@@ -138,9 +138,21 @@ function (superbuild_find_projects var)
mark_as_advanced(USE_NONFREE_COMPONENTS)
if (USE_NONFREE_COMPONENTS)
list(APPEND projects
capstone
cubit
triangle)
endif ()
# Capstone and Cubit are closed-source programs to which Kitware developers
# have access. We provide logic for situating these programs into our
# superbuild for development purposes only. These packages are not bundled or
# distributed.
set(KW_SHARE "" CACHE PATH "Location of Kitware-internal share directory.")
if (NOT (capstone_enabled OR cubit_enabled))
mark_as_advanced(KW_SHARE)
endif ()
set("${var}"
${projects}
PARENT_SCOPE)
......
# Capstone is a private program to which Kitware developers have access. We
# provide logic for situating these programs into our superbuild for development
# purposes only. Nothing is bundled or distributed.
superbuild_add_project(capstone
CAN_USE_SYSTEM
DOWNLOAD_NO_EXTRACT 1
CONFIGURE_COMMAND
/bin/sh -c "yes | hdiutil attach -mountpoint '<SOURCE_DIR>' '<DOWNLOADED_FILE>'"
BUILD_COMMAND
${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>/Capstone-9.1.2" "<BINARY_DIR>"
INSTALL_COMMAND
hdiutil detach <SOURCE_DIR>
)
set(capstone_pythonpath ${CMAKE_CURRENT_BINARY_DIR}/capstone/build/Capstone.app/Contents/MacOS)
set(CreateMG_DIR ${CMAKE_CURRENT_BINARY_DIR}/capstone/build/lib)
# Cubit is a private program to which Kitware developers have access. We provide
# logic for situating these programs into our superbuild for development
# purposes only. Nothing is bundled or distributed.
superbuild_add_project(cubit
CAN_USE_SYSTEM
DOWNLOAD_NO_EXTRACT 1
CONFIGURE_COMMAND
/bin/sh -c "yes | hdiutil attach -mountpoint '<SOURCE_DIR>' '<DOWNLOADED_FILE>'"
BUILD_COMMAND
${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>/Cubit-15.2" "<BINARY_DIR>"
INSTALL_COMMAND
hdiutil detach <SOURCE_DIR>
)
set(CUBIT_EXE ${CMAKE_CURRENT_BINARY_DIR}/cubit/build/Cubit.app/Contents/MacOS/Cubit)
# Capstone is a private program to which Kitware developers have access. We
# provide logic for situating these programs into our superbuild for development
# purposes only. Nothing is bundled or distributed.
find_package(CreateMG REQUIRED)
set(capstone_pythonpath ${CreateMG_DIR}/bin)
if (APPLE)
set(capstone_pythonpath ${CreateMG_DIR}/../Capstone.app/Contents/MacOS)
endif ()
# Cubit is a private program to which Kitware developers have access. We provide
# logic for situating these programs into our superbuild for development
# purposes only. Nothing is bundled or distributed.
set(CUBIT_EXE "" CACHE PATH "Location of Cubit executable")
if (NOT EXISTS ${CUBIT_EXE})
message(FATAL_ERROR "Could not access Cubit executable at ${CUBIT_EXE}")
endif ()
......@@ -12,10 +12,24 @@ if (WIN32)
set(response_file -DCMAKE_NINJA_FORCE_RESPONSE_FILE:BOOL=ON)
endif ()
if (cubit_enabled)
list(APPEND extra_cmake_args
-DENABLE_CUBIT_BINDINGS:BOOL=ON
-DCUBIT_EXE:PATH=${CUBIT_EXE}
)
endif ()
if (meshkit_enabled)
list(APPEND extra_cmake_args
-DASSYGEN_EXE:PATH=<INSTALL_DIR>/meshkit/bin/assygen
-DCOREGEN_EXE:PATH=<INSTALL_DIR>/meshkit/bin/coregen
)
endif ()
superbuild_add_project(rggsession
DEBUGGABLE
DEPENDS boost cxx11 paraview qt qt5 smtk
DEPENDS_OPTIONAL python meshkit
DEPENDS_OPTIONAL pyarc python meshkit cubit
CMAKE_ARGS
${extra_cmake_args}
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
......
# Capstone is a private program to which Kitware developers have access. We
# provide logic for situating these programs into our superbuild for development
# purposes only. Nothing is bundled or distributed.
superbuild_add_project(capstone
CAN_USE_SYSTEM
CONFIGURE_COMMAND ""
BUILD_COMMAND
${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>" "<BINARY_DIR>"
INSTALL_COMMAND ""
)
set(capstone_pythonpath ${CMAKE_CURRENT_BINARY_DIR}/capstone/build/bin)
set(CreateMG_DIR ${CMAKE_CURRENT_BINARY_DIR}/capstone/build/lib)
# Cubit is a private program to which Kitware developers have access. We provide
# logic for situating these programs into our superbuild for development
# purposes only. Nothing is bundled or distributed.
superbuild_add_project(cubit
CAN_USE_SYSTEM
CONFIGURE_COMMAND ""
BUILD_COMMAND
${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>" "<BINARY_DIR>"
INSTALL_COMMAND ""
)
set(CUBIT_EXE ${CMAKE_CURRENT_BINARY_DIR}/cubit/build/Cubit)
# Capstone is a private program to which Kitware developers have access. We
# provide logic for situating these programs into our superbuild for development
# purposes only. Nothing is bundled or distributed.
superbuild_add_project(capstone
MUST_USE_SYSTEM)
......@@ -164,3 +164,27 @@ superbuild_set_revision(smtkprojectmanager
superbuild_set_revision(pegtl
GIT_REPOSITORY "https://github.com/taocpp/PEGTL.git"
GIT_TAG 2.7.1)
if (APPLE)
set(capstone_file "Capstone_MacOsX_V912_Git_37e7ecd9b.dmg")
set(capstone_md5 d7d64e784864295282e487930b4aafee)
elseif (NOT WIN32)
set(capstone_file "Capstone_Redhat_7_6_V912_Git_37e7ecd.tar.gz")
set(capstone_md5 5ecfd45eaa7b9b8109e72aa6fcfc0844)
endif ()
superbuild_set_revision(capstone
URL "file://${KW_SHARE}/Projects/CMB/dependencies/Capstone-9.1.2/${capstone_file}"
URL_MD5 "${capstone_md5}")
if (APPLE)
set(cubit_file "Cubit-15.2-Mac64.dmg")
set(cubit_md5 2bf9dedc8029b32040f06414ba3b88f9)
elseif (NOT WIN32)
set(cubit_file "Cubit-15.2-Lin64.tar")
set(cubit_md5 4f2cb33ac8eae693fdc289bc4ef172f4)
endif ()
superbuild_set_revision(cubit
URL "file://${KW_SHARE}/Projects/CMB/dependencies/Cubit-15.2/${cubit_file}"
URL_MD5 "${cubit_md5}")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment