Skip to content

Commit

Permalink
Merge pull request #309 from jafj/FixSwigCmakeErrors
Browse files Browse the repository at this point in the history
Add new CMake policies to build if present
  • Loading branch information
guruofquality authored Jun 1, 2021
2 parents 5bcb611 + eed5b43 commit e8b1d45
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ project(SoapySDR)
enable_language(CXX)
enable_testing()

# Enable newer CMake policies if available
if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW) # option() honors normal variables
endif()
if(POLICY CMP0078)
cmake_policy(SET CMP0078 NEW) # UseSWIG generates standard target names
endif()
if(POLICY CMP0086)
cmake_policy(SET CMP0086 NEW) # UseSWIG honors SWIG_MODULE_NAME via -module flag
endif()
if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW) # RPATH settings on macOS do not affect install_name
endif()

#C++11 is a required language feature for this project
set(CMAKE_CXX_STANDARD 11)

Expand Down

0 comments on commit e8b1d45

Please sign in to comment.