Skip to content

Commit

Permalink
refactor: removal of unused cmake and vcpkg stuff, and adding bold re…
Browse files Browse the repository at this point in the history
…d to some error messages
  • Loading branch information
braindigitalis committed Sep 20, 2023
1 parent ee26853 commit f08b8f0
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 90 deletions.
19 changes: 0 additions & 19 deletions cmake/PostBuild.cmake

This file was deleted.

27 changes: 0 additions & 27 deletions cmake/Raw-Files/Bottom-Of-Portfile.cmake

This file was deleted.

22 changes: 0 additions & 22 deletions cmake/Raw-Files/Bottom-Of-Version-File.txt

This file was deleted.

1 change: 0 additions & 1 deletion cmake/Raw-Files/Middle-Of-Portfile.cmake

This file was deleted.

4 changes: 0 additions & 4 deletions cmake/Raw-Files/Top-Of-Portfile.cmake

This file was deleted.

3 changes: 0 additions & 3 deletions cmake/Raw-Files/Top-Of-Version-File.txt

This file was deleted.

14 changes: 7 additions & 7 deletions library-vcpkg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ add_library("${PROJECT_NAME}::${LIB_NAME}" ALIAS "${LIB_NAME}")

if(${AVX_TYPE} STREQUAL "OFF")
include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/DetectArchitecture.cmake")
message("--- AVX type: ${AVX_TYPE}")
else()
message("-- AVX type overridden by configuration: ${AVX_TYPE}")
endif()
Expand All @@ -26,12 +25,13 @@ target_compile_definitions(
"DPP_BUILD"
)

add_compile_definitions(OPENSSL_SYS_WIN32)
add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS)
add_compile_definitions(WIN32_LEAN_AND_MEAN)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE)
add_compile_definitions(T_fallback)
if(WIN32)
add_compile_definitions(OPENSSL_SYS_WIN32)
add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS)
add_compile_definitions(WIN32_LEAN_AND_MEAN)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE)
endif()

target_compile_options(
"${LIB_NAME}" PUBLIC
Expand Down
14 changes: 7 additions & 7 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ add_compile_definitions(DPP_OS=${CMAKE_SYSTEM_NAME})

if(${AVX_TYPE} STREQUAL "OFF")
include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/DetectArchitecture.cmake")
message("--- AVX type: ${AVX_TYPE}")
else()
message("-- AVX type overridden by configuration: ${AVX_TYPE}")
endif()
Expand Down Expand Up @@ -318,23 +317,23 @@ if(DPP_CORO)
" IS_GLIBCXX)
if(IS_GLIBCXX)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0.0)
message(FATAL_ERROR "Clang with stdc++ and coroutines requires version 12.0.0 or above")
message(FATAL_ERROR "${BoldRed}Clang with stdc++ and coroutines requires version 12.0.0 or above${ColourReset}")
endif()
message("-- ${Yellow}Detected stdc++ - enabling mock std::experimental namespace${ColourReset}")
target_compile_definitions(dpp PUBLIC "STDCORO_GLIBCXX_COMPAT")
else()
message("-- ${Yellow}Detected libc++ - using <experimental/coroutine>")
message("-- ${Yellow}Detected libc++ - using <experimental/coroutine>${ColourReset}")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines-ts")
endif()
endif()
message("-- ${Yellow}Note - coroutines in clang < 14 are experimental, upgrading is recommended")
message("-- ${Yellow}Note - coroutines in clang < 14 are experimental, upgrading is recommended${ColourReset}")
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
message(FATAL_ERROR "Coroutines with g++ require version 10 or above")
message(FATAL_ERROR "${BoldRed}Coroutines with g++ require version 10 or above${ColourReset}")
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0)
message("-- ${Yellow}Note - coroutines in g++10 are experimental, upgrading to g++11 or above is recommended")
message("-- ${Yellow}Note - coroutines in g++10 are experimental, upgrading to g++11 or above is recommended${ColourReset}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines")
endif()
endif()
Expand Down Expand Up @@ -406,7 +405,8 @@ if(DPP_INSTALL)
install(DIRECTORY ../include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
endif()

include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/CPackSetup.cmake") # Setup information for packaging and distribution
# Setup information for packaging and distribution
include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/CPackSetup.cmake")

# CPack initialization for distribution
include(CPack)
Expand Down

0 comments on commit f08b8f0

Please sign in to comment.