Skip to content

Commit

Permalink
Add DART_BUILD_WHEELS option
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Mar 13, 2024
1 parent 6c4ec76 commit 5c9c5c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ else()
option(DART_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" ON)
endif()

option(DART_BUILD_WHEELS "Indicate building dartpy for wheels" OFF)

#===============================================================================
# Find dependencies
#===============================================================================
Expand Down Expand Up @@ -250,8 +252,13 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
endif()
execute_process(
COMMAND ${CMAKE_CXX_COMPILER} -dumpfullversion -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_LESS 7.3.0)
message(FATAL_ERROR "The installed g++ version is ${GCC_VERSION}. ${PROJECT_NAME} requires g++ 7.3.0 or greater.")
if(DART_BUILD_WHEELS)
set(gcc_required_version 10.2.1) # Lowered from 11.2.0 to support building in manylinux2014
else()
set(gcc_required_version 11.2.0)
endif()
if(GCC_VERSION VERSION_LESS ${gcc_required_version})
message(FATAL_ERROR "The installed g++ version is ${GCC_VERSION}. ${PROJECT_NAME} requires g++ ${gcc_required_version} or greater.")
endif()
if(GCC_VERSION VERSION_GREATER_EQUAL 13.2.0)
# TODO: These warnings should be properly addressed and these compiler options removed
Expand Down
6 changes: 5 additions & 1 deletion cmake/DARTFindOpenGL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ cmake_policy(PUSH)

# Use GLVND over the legacy OpenGL libraries
if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW)
if(DART_BUILD_WHEELS)
cmake_policy(SET CMP0072 OLD)
else()
cmake_policy(SET CMP0072 NEW)
endif()
endif()

# Use OpenGL config if available
Expand Down

0 comments on commit 5c9c5c1

Please sign in to comment.