Skip to content

Commit

Permalink
Merge b22bc98 into 7161aaa
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits committed May 2, 2019
2 parents 7161aaa + b22bc98 commit 18fff75
Show file tree
Hide file tree
Showing 293 changed files with 28 additions and 53,103 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "rapidjson"]
path = rapidjson
url = ../../Tencent/rapidjson.git
28 changes: 23 additions & 5 deletions CMakeLists.txt
Expand Up @@ -26,7 +26,6 @@ ProcessorCount(NumProcessors)
message(STATUS "Number of processors: ${NumProcessors}")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/nprocs.txt ${NumProcessors})


option(PROFILE "Turn on flags required for profiling" OFF)
option(VALGRIND_PROFILE "Turn on flags required for profiling with valgrind" OFF)
option(GCOV "Turn on flags required for gcov" OFF)
Expand Down Expand Up @@ -85,10 +84,6 @@ if(GCOV)
set(linux_flags ${linux_flags} -g -O0 -fprofile-arcs -ftest-coverage -fno-strict-aliasing -pg)
endif()

# TODO move to consuming vcpkg of this dependency
add_library(rapidjson INTERFACE)
target_include_directories(rapidjson INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/include)

# Use folders in VS solution
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

Expand Down Expand Up @@ -130,6 +125,29 @@ endif()
find_package(Boost REQUIRED COMPONENTS program_options system thread unit_test_framework)
find_package(ZLIB REQUIRED)

# Ensure rapidjson submodule is ready
find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
# Update submodules as needed
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()
endif()

if(NOT EXISTS "${PROJECT_SOURCE_DIR}/rapidjson/CMakeLists.txt")
message(FATAL_ERROR "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()

add_library(rapidjson INTERFACE)
target_include_directories(rapidjson INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/include)

add_subdirectory(cluster)
add_subdirectory(library)
add_subdirectory(vowpalwabbit)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -3,7 +3,6 @@ os: Windows Server 2012 R2
configuration:
- Release
platform: x64
shallow_clone: true
clone_folder: C:\vowpal_wabbit
cache:
- vowpalwabbit\packages -> **\packages.config
Expand All @@ -19,6 +18,7 @@ build_script:
- SET nugetPath=%vwRoot%\vowpalwabbit\.nuget\nuget
# Restore and build
- cd %vwRoot%
- git submodule update --init --recursive
- .scripts/restore.cmd
- .scripts/build.cmd
test_script:
Expand Down
1 change: 1 addition & 0 deletions rapidjson
Submodule rapidjson added at f54b0e
22 changes: 0 additions & 22 deletions rapidjson/.gitattributes

This file was deleted.

25 changes: 0 additions & 25 deletions rapidjson/.gitignore

This file was deleted.

98 changes: 0 additions & 98 deletions rapidjson/.travis.yml

This file was deleted.

158 changes: 0 additions & 158 deletions rapidjson/CHANGELOG.md

This file was deleted.

0 comments on commit 18fff75

Please sign in to comment.