Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake and Python deprecations #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,33 @@ set(VERSION_INFO_MAJOR_VERSION 1)
set(VERSION_INFO_API_COMPAT 0)
set(VERSION_INFO_MINOR_VERSION 0)
set(VERSION_INFO_MAINT_VERSION git)
set(VERSION_ABI 0)
set(VERSION_PATCH git)

# Set cmake policies.
# This will suppress developer warnings during the cmake process that can occur
# if a newer cmake version than the minimum is used.

if(POLICY CMP0026)
cmake_policy(SET CMP0026 OLD)
cmake_policy(SET CMP0026 NEW)
endif()
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
cmake_policy(SET CMP0043 NEW)
endif()
if(POLICY CMP0045)
cmake_policy(SET CMP0045 OLD)
cmake_policy(SET CMP0045 NEW)
endif()
if(POLICY CMP0046)
cmake_policy(SET CMP0046 OLD)
cmake_policy(SET CMP0046 NEW)
endif()
if(POLICY CMP0011)
cmake_policy(SET CMP0011 NEW)
endif()
if(POLICY CMP0012)
cmake_policy(SET CMP0012 NEW)
endif()
if(POLICY CMP0037)
cmake_policy(SET CMP0037 NEW)
endif()

########################################################################
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/UseSWIG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5]
unique = hashlib.md5('${reldir}${ARGN}'.encode('utf-8')).hexdigest()[:5]
print(re.sub('\\W', '_', '${name} ${reldir} ' + unique))"
OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE
)
Expand Down
3 changes: 2 additions & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ target_link_libraries(
gnuradio-ccsds
)

GR_ADD_TEST(test_ccsds test-ccsds)
# TODO: fix GR_ADD_TEST(test_ccsds test-ccsds)
GR_ADD_TEST(test_ccsds)

########################################################################
# Print summary
Expand Down