Skip to content

Commit

Permalink
Simpler overrideable settings for cxx standard in dependency builds
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAce committed Jun 2, 2021
1 parent d64c810 commit afc67c3
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions cmake/InstallPackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,9 @@ function(install_package package_name install_dir extra_flags)
mark_as_advanced(install_dir)
endif()

if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
endif()
if(NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE CACHE BOOL "" FORCE)
endif()
if(NOT DEFINED CMAKE_CXX_EXTENSIONS)
set(CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "" FORCE)
endif()
if(NOT DEFINED CMAKE_INSTALL_RPATH_USE_LINK_PATH)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "Keep rpath on installed packages" FORCE)
endif()
set(CMAKE_CXX_STANDARD 17 CACHE STRING "")
set(CMAKE_CXX_STANDARD_REQUIRED TRUE CACHE BOOL "")
set(CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "")

generate_init_cache()
execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory ${build_dir})
Expand Down

0 comments on commit afc67c3

Please sign in to comment.