[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] Question regarding External Project add and VTK
From: jmerkow <jmerkow () gmail ! com>
Date: 2014-06-03 22:04:23
Message-ID: 1401833063339-7587571.post () n2 ! nabble ! com
[Download RAW message or body]
Jc,
Im been updating my CMakeLists.txt to do this superbuild. But I am running
into an error. Im not sure why...
My project is something like the following:
cmake_minimum_required(VERSION 2.8.8)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake"
"${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild"
"${CMAKE_MODULE_PATH}")
set(EXTERNAL_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CMakeExternals)
set(EXTERNAL_PROJECT_FILE_PREFIX "")
include(ExternalProject)
include(ExternalProjectDependency)
project(myproj)
option(SuperBuild_${PROJECT_NAME}
"Build ${PROJECT_NAME} and the projects it depends on.
This must be turn on if your wish to download any packages." ON)
<some find package commands, not included in superbuild yet>
ExternalProject_Include_Dependencies(${PROJECT_NAME} PROJECT_VAR
PROJECT_NAME)
if(SuperBuild_${PROJECT_NAME})
include(Superbuild)
RETURN()
endif()
SuperBuild/Superbuild.cmake:
set(${PROJECT_NAME}_DEPENDS "")
set(${PROJECT_NAME}_DEPENDS ${${PROJECT_NAME}_DEPENDS} VTK)
set(proj ${PROJECT_NAME})
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
DEPENDS ${${PROJECT_NAME}_DEPENDS}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
BINARY_DIR ${SimVascular_BINARY_DIR}
DOWNLOAD_COMMAND ""
UPDATE_COMMAND ""
CMAKE_CACHE_ARGS
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
-DADDITIONAL_C_FLAGS:STRING=${ADDITIONAL_C_FLAGS}
-DADDITIONAL_CXX_FLAGS:STRING=${ADDITIONAL_CXX_FLAGS}
-DSuperBuild_${PROJECT_NAME}:BOOL=OFF
${EXTERNAL_PROJECT_OPTIONAL_ARGS}
INSTALL_COMMAND ""
)
and CMakeExternals/VTK.cmake is basically a copy of [1], with proj set to
VTK, and all slicer references removed.
I am getting this error:
CMake Error at /usr/share/cmake-2.8/Modules/ExternalProject.cmake:1580
(get_property):
get_property could not find TARGET VTK. Perhaps it has not yet been
created.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/ExternalProject.cmake:1808
(_ep_add_configure_command)
SuperBuild/Superbuild.cmake:51 (ExternalProject_Add)
CMakeLists.txt:659 (include)
Im not sure whats going wrong, it seems like it should pick up my VTK.cmake
in the CMakeExternals directory automatically, correct?
Thanks a lot for your help!
-Jameson
P.S. I'm thinking we may want to move this off the CMake mailing list?
[1]
https://github.com/Slicer/Slicer/blob/master/SuperBuild/External_VTKv6.cmake
--
View this message in context: \
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587571.html
Sent from the CMake mailing list archive at Nabble.com.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic