[CMake] ExternalProject_Add always try to connect to SVN server

Anton Deguet anton.deguet at jhu.edu
Sat Sep 13 13:36:46 EDT 2014


Hello,

I'm wondering if I'm doing something wrong using ExternalProject_Add for a subversion repository.  I would expect the following behavior:

- First run, see if local copy of code has been checked out.  If not 'svn checkout'.  Fails if not connected to internet.
- Consecutive runs:
  - if svn local revision different from SVN_REVISION, do a `svn update` to revision specified in ExternalProject_Add
  - if svn local revision same as requested, do nothing

I'm having some issues with the last case, i.e. the code is checked out and 'svn info' tells me I have the desired revision but somehow the build process is still trying to reach the svn server.   Since I'm working off the grid, my build fails.

Questions:
- Did I do something wrong or set an options somewhere that forces CMake to check the SVN server systematically?
- Is there an option or command I can set to build when not connected to internet?

Sincerely,

Anton


CMake version:  2.8.12.2 on Ubuntu 14.04
Code:
  include (ExternalProject)
  set (cisstJSON_PREFIX cisstJSONExternal)
  set (CISST_JSON_SVN_REPOSITORY http://svn.code.sf.net/p/jsoncpp/code/trunk/jsoncpp)
  set (CISST_JSON_SVN_REVISION 276)
  ExternalProject_Add (cisstJSONExternal
                       PREFIX ${cisstJSON_PREFIX}
                       SVN_REPOSITORY ${CISST_JSON_SVN_REPOSITORY}
                       SVN_REVISION   -r ${CISST_JSON_SVN_REVISION}
                       CMAKE_CACHE_ARGS -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
                                        -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
                                        -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
                                        -DOPTION_BUILD_EXAMPLES:BOOL=OFF
                                        -DJSONCPP_WITH_TESTS:BOOL=OFF
                                        -DJSONCPP_WITH_POST_BUILD_UNITTEST:BOOL=OFF
                                        -DCMAKE_INSTALL_PREFIX:FILEPATH=${cisst_BINARY_DIR}/cisstJSON
                       INSTALL_DIR ${cisst_BINARY_DIR}/cisstJSON
                       TIMEOUT 3
                       )




More information about the CMake mailing list