Index: head/devel/xeus/files/patch-CMakeLists.txt =================================================================== --- head/devel/xeus/files/patch-CMakeLists.txt (revision 483669) +++ head/devel/xeus/files/patch-CMakeLists.txt (revision 483670) @@ -1,51 +1,69 @@ --- CMakeLists.txt.orig 2018-07-01 17:59:23 UTC +++ CMakeLists.txt @@ -46,11 +46,12 @@ message(STATUS "xeus binary version: v${XEUS_BINARY_VE # Dependencies # ============ +FIND_PACKAGE(PkgConfig) find_package(nlohmann_json 3.1.1 REQUIRED) find_package(xtl 0.4 REQUIRED) -find_package(ZeroMQ 4.2.3 REQUIRED) +pkg_check_modules(ZeroMQ libzmq>=4.2.3 REQUIRED) find_package(cppzmq 4.2.3 REQUIRED) -find_package(cryptopp REQUIRED) +pkg_check_modules(cryptopp libcryptopp REQUIRED) # Source files # ============ @@ -111,7 +112,7 @@ target_link_libraries(xeus PUBLIC cppzmq PUBLIC nlohmann_json PUBLIC xtl - PRIVATE cryptopp-static) + PRIVATE cryptopp) if(NOT MSVC) if(APPLE) @@ -139,14 +140,12 @@ include(CMakePushCheckState) cmake_push_check_state() # HAVE_CRYPTOPP_BYTE_T -get_target_property(cryptopp_INCLUDE_DIR cryptopp-static INTERFACE_INCLUDE_DIRECTORIES) -get_target_property(cryptopp_LIBRARY cryptopp-static LOCATION) set(CMAKE_REQUIRED_LIBRARIES ${cryptopp_LIBRARY}) set(CMAKE_REQUIRED_INCLUDES ${cryptopp_INCLUDE_DIR}) check_cxx_source_compiles(" #include \"cryptopp/config.h\" int main(){ - [[maybe_unused]] CryptoPP::byte b = CryptoPP::byte{0x36}; + CryptoPP::byte b = (CryptoPP::byte){0x36}; }" HAVE_CRYPTOPP_BYTE_T) cmake_pop_check_state() -@@ -206,7 +205,7 @@ if(MSVC) +@@ -160,17 +159,11 @@ endif() + + include(CheckCXXCompilerFlag) + string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE) +-OPTION(DISABLE_ARCH_NATIVE "disable -march=native flag" OFF) + + target_compile_features(xeus PRIVATE cxx_std_11) + + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel") + target_compile_options(xeus PUBLIC -Wunused-parameter -Wextra -Wreorder) +- if (DISABLE_ARCH_NATIVE) +- target_compile_options(xeus PUBLIC -mtune=generic) +- else() +- target_compile_options(xeus PUBLIC -march=native) +- endif() + + # Enable link time optimization and set the default symbol + # visibility to hidden (very important to obtain small binaries) +@@ -206,7 +199,7 @@ if(MSVC) elseif(APPLE) target_compile_definitions(xeus PUBLIC -DGUID_CFUUID) else() - target_compile_definitions(xeus PUBLIC -DGUID_LIBUUID) + target_compile_definitions(xeus PUBLIC -DGUID_LIBUUID ${cryptopp_CFLAGS_OTHER}) endif() # Examples