diff --git a/.travis.yml b/.travis.yml index f1bddf0ac..343398659 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,8 +47,9 @@ addons: branch_pattern: coverity_scan before_script: + - env - if [ $TRAVIS_OS_NAME == linux ]; then qmake QMAKE_CC=$CC QMAKE_CXX=$CXX; fi - - if [ $TRAVIS_OS_NAME == osx ]; then qmake QMAKE_CC=$CC QMAKE_CXX=$CXX CONFIG+=rs_macos10.14 CONFIG+=no_retroshare_plugins INCLUDEPATH+=/usr/local/opt/openssl/include/ INCLUDEPATH+=/usr/local/Cellar/sqlcipher/4.0.1/include INCLUDEPATH+=/usr/local/Cellar/libmicrohttpd/0.9.62_1/include QMAKE_LIBDIR+=/usr/local/opt/openssl/lib/ QMAKE_LIBDIR+=/usr/local/Cellar/libmicrohttpd/0.9.62_1/lib QMAKE_LIBDIR+=/usr/local/Cellar/sqlcipher/4.0.1/lib; fi + - if [ $TRAVIS_OS_NAME == osx ]; then qmake QMAKE_CC=clang QMAKE_CXX=$CXX CONFIG+=rs_macos10.14 CONFIG+=no_retroshare_plugins CONFIG+=no_rs_broadcast_discovery INCLUDEPATH+=/usr/local/opt/openssl/include/ INCLUDEPATH+=/usr/local/Cellar/sqlcipher/4.0.1/include INCLUDEPATH+=/usr/local/Cellar/libmicrohttpd/0.9.62_1/include QMAKE_LIBDIR+=/usr/local/opt/openssl/lib/ QMAKE_LIBDIR+=/usr/local/Cellar/libmicrohttpd/0.9.62_1/lib QMAKE_LIBDIR+=/usr/local/Cellar/sqlcipher/4.0.1/lib; fi script: - if [ $TRAVIS_OS_NAME == osx ] && [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then make -j4; fi diff --git a/appveyor.yml b/appveyor.yml index 420e0bb9b..4151639da 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -136,6 +136,7 @@ before_package: # to run your custom scripts instead of automatic MSBuild build_script: + - env - qmake -Wall -spec win32-g++ "CONFIG=debug" - mingw32-make -j3 diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index b92e92c8d..339412bb4 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -883,7 +883,7 @@ rs_jsonapi { $${CMAKE_GENERATOR_OVERRIDE} -DBUILD_SSL=OFF \ -DCMAKE_INSTALL_PREFIX=. -B. \ -H$$shell_path($${RESTBED_SRC_PATH}) && \ - make + $(MAKE) QMAKE_EXTRA_COMPILERS += genrestbedlib RESTBED_HEADER_FILE=$$clean_path($${RESTBED_BUILD_PATH}/include/restbed) @@ -892,7 +892,7 @@ rs_jsonapi { genrestbedheader.output = $${RESTBED_HEADER_FILE} genrestbedheader.CONFIG += target_predeps combine no_link genrestbedheader.variable_out = HEADERS - genrestbedheader.commands = cd $${RESTBED_BUILD_PATH} && make install + genrestbedheader.commands = cd $${RESTBED_BUILD_PATH} && $(MAKE) install QMAKE_EXTRA_COMPILERS += genrestbedheader } @@ -936,7 +936,14 @@ rs_broadcast_discovery { no_rs_cross_compiling { DUMMYQMAKECOMPILERINPUT = FORCE CMAKE_GENERATOR_OVERRIDE="" - win32-g++:CMAKE_GENERATOR_OVERRIDE="-G \"MSYS Makefiles\"" + CMAKE_C_COMPILER_OVERRIDE="" + win32-g++ { + CMAKE_GENERATOR_OVERRIDE="-G \"MSYS Makefiles\"" + APPVEYOR=$$(APPVEYOR) + equals(APPVEYOR, "True") { + CMAKE_C_COMPILER_OVERRIDE="-DCMAKE_C_COMPILER=gcc" + } + } udpdiscoverycpplib.name = Generating libudp-discovery.a. udpdiscoverycpplib.input = DUMMYQMAKECOMPILERINPUT udpdiscoverycpplib.output = $$clean_path($${UDP_DISCOVERY_BUILD_PATH}/libudp-discovery.a) @@ -948,12 +955,13 @@ rs_broadcast_discovery { true ) && \ mkdir -p $${UDP_DISCOVERY_BUILD_PATH} && \ cd $${UDP_DISCOVERY_BUILD_PATH} && \ - cmake -DCMAKE_CXX_COMPILER=$$QMAKE_CXX \ + cmake $${CMAKE_C_COMPILER_OVERRIDE} \ + -DCMAKE_CXX_COMPILER=$$QMAKE_CXX \ $${CMAKE_GENERATOR_OVERRIDE} \ -DBUILD_EXAMPLE=OFF -DBUILD_TOOL=OFF \ -DCMAKE_INSTALL_PREFIX=. -B. \ -H$$shell_path($${UDP_DISCOVERY_SRC_PATH}) && \ - make + $(MAKE) QMAKE_EXTRA_COMPILERS += udpdiscoverycpplib } }