Stop bullet from spamming our CMake runs with warnings
This commit is contained in:
parent
6d9602b12a
commit
b67fbfc0ae
3 changed files with 65 additions and 50 deletions
6
extern/CMakeLists.txt
vendored
6
extern/CMakeLists.txt
vendored
|
@ -1,9 +1,12 @@
|
||||||
set(CMAKE_FOLDER "External")
|
set(CMAKE_FOLDER "External")
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
bullet
|
bullet
|
||||||
GIT_REPOSITORY https://github.com/bulletphysics/bullet3.git
|
GIT_REPOSITORY https://github.com/bulletphysics/bullet3.git
|
||||||
GIT_TAG 2.89
|
GIT_TAG 2.89
|
||||||
|
CMAKE_ARGS "-Wno-dev"
|
||||||
|
PATCH_COMMAND git apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/fix_bullet_cmake_version.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
|
@ -47,6 +50,7 @@ set(USE_MSVC_RUNTIME_LIBRARY_DLL ON CACHE BOOL "" FORCE)
|
||||||
set(ENABLE_GLSLANG_INSTALL OFF CACHE BOOL "" FORCE)
|
set(ENABLE_GLSLANG_INSTALL OFF CACHE BOOL "" FORCE)
|
||||||
set(ENABLE_CTEST OFF CACHE BOOL "" FORCE)
|
set(ENABLE_CTEST OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_PROJECT_BULLET_PHYSICS_INCLUDE_BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/fix_bad_cmake_dev.cmake)
|
||||||
FetchContent_MakeAvailable(bullet)
|
FetchContent_MakeAvailable(bullet)
|
||||||
FetchContent_MakeAvailable(spirv-cross)
|
FetchContent_MakeAvailable(spirv-cross)
|
||||||
FetchContent_MakeAvailable(glslang)
|
FetchContent_MakeAvailable(glslang)
|
||||||
|
@ -60,8 +64,6 @@ add_subdirectory(magic_enum)
|
||||||
add_subdirectory(smaa)
|
add_subdirectory(smaa)
|
||||||
add_subdirectory(doctest)
|
add_subdirectory(doctest)
|
||||||
|
|
||||||
include(FetchContent)
|
|
||||||
|
|
||||||
FetchContent_Declare(json
|
FetchContent_Declare(json
|
||||||
GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git
|
GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git
|
||||||
GIT_TAG v3.9.1)
|
GIT_TAG v3.9.1)
|
||||||
|
|
3
extern/fix_bad_cmake_dev.cmake
vendored
Normal file
3
extern/fix_bad_cmake_dev.cmake
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
cmake_policy(SET CMP0115 OLD)
|
||||||
|
cmake_policy(SET CMP0072 NEW)
|
10
extern/fix_bullet_cmake_version.patch
vendored
Normal file
10
extern/fix_bullet_cmake_version.patch
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 68e0a93bc..5b83fb1cd 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-cmake_minimum_required(VERSION 2.4.3)
|
||||||
|
+cmake_minimum_required(VERSION 2.8.12)
|
||||||
|
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
|
cmake_policy(SET CMP0017 NEW)
|
||||||
|
#this line has to appear before 'PROJECT' in order to be able to disable incremental linking
|
Reference in a new issue