aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@mines-paris.org>2018-11-15 16:09:38 +0100
committerGitHub <noreply@github.com>2018-11-15 16:09:38 +0100
commit214f086ab61f9964cbabccb9c002c915e2870539 (patch)
tree464bcc71f6468d0498f9fce7441c06c78bc1bba4
parent4ad1477c24c3da4be6c7962606e6f9d47336b6a3 (diff)
parent92d5abac3d402a8d2cbaee972bd39c4885de9fef (diff)
downloadPROJ-214f086ab61f9964cbabccb9c002c915e2870539.tar.gz
PROJ-214f086ab61f9964cbabccb9c002c915e2870539.zip
Merge pull request #1176 from rouault/cond_test_build
Condtional build of test subdir + warning fix
-rw-r--r--CMakeLists.txt5
-rw-r--r--Makefile.am6
-rw-r--r--appveyor.yml8
-rw-r--r--include/proj/CMakeLists.txt2
-rw-r--r--src/coordinateoperation.cpp12
-rwxr-xr-xtravis/mingw32/install.sh2
6 files changed, 20 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62a16d7f..66a0d4cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,5 +191,6 @@ add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(man)
add_subdirectory(cmake)
-add_subdirectory(test)
-
+if(PROJ_TESTS)
+ add_subdirectory(test)
+endif()
diff --git a/Makefile.am b/Makefile.am
index 52e456ff..8620ea8f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,5 @@
-SUBDIRS = include src man data jniwrap cmake test
+SUBDIRS = include src man data jniwrap cmake
+DIST_SUBDIRS = include src man data jniwrap cmake test
EXTRA_DIST = CMakeLists.txt CITATION
@@ -8,6 +9,9 @@ pkgconfig_DATA = proj.pc
AUTOMAKE_OPTIONS = dist-zip
ACLOCAL_AMFLAGS = -I m4
+check-local:
+ cd test; $(MAKE) check
+
README: README.md
fgrep -v "[![" $< > $@
diff --git a/appveyor.yml b/appveyor.yml
index 2a1aa976..13ac6d36 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -30,16 +30,16 @@ build_script:
- if "%platform%" == "x64" cd build_dll
- if "%platform%" == "x64" copy ..\sqlite3.exe .
- if "%platform%" == "x64" copy c:\tools\vcpkg\installed\x64-windows\bin\sqlite3.dll .
- - if "%platform%" == "x64" cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=ON -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
- - if "%platform%" == "x64" cmake --build . --config Release
+ - if "%platform%" == "x64" cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=ON -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%CD%/install"
+ - if "%platform%" == "x64" cmake --build . --config Release --target install
- if "%platform%" == "x64" cd ..
#
- if "%platform%" == "x86" mkdir build_static
- if "%platform%" == "x86" cd build_static
- if "%platform%" == "x86" copy ..\sqlite3.exe .
- if "%platform%" == "x86" copy c:\tools\vcpkg\installed\x86-windows\bin\sqlite3.dll .
- - if "%platform%" == "x86" cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=OFF -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
- - if "%platform%" == "x86" cmake --build . --config Release
+ - if "%platform%" == "x86" cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=OFF -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%CD%/install"
+ - if "%platform%" == "x86" cmake --build . --config Release --target install
- if "%platform%" == "x86" cd ..
test_script:
diff --git a/include/proj/CMakeLists.txt b/include/proj/CMakeLists.txt
index d112cf74..0f889f74 100644
--- a/include/proj/CMakeLists.txt
+++ b/include/proj/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(installdest include/proj)
+set(installdest ${INCLUDEDIR}/proj)
install(
FILES util.hpp metadata.hpp common.hpp crs.hpp datum.hpp
diff --git a/src/coordinateoperation.cpp b/src/coordinateoperation.cpp
index 645bd0ed..33e6f422 100644
--- a/src/coordinateoperation.cpp
+++ b/src/coordinateoperation.cpp
@@ -4329,7 +4329,7 @@ ConversionPtr Conversion::convertToOtherMethod(int targetEPSGCode) const {
common::Length(
parameterValueMeasure(EPSG_CODE_PARAMETER_FALSE_NORTHING)));
conv->setCRSs(this, false);
- return conv;
+ return std::move(conv);
}
if (current_epsg_code == EPSG_CODE_METHOD_MERCATOR_VARIANT_B &&
@@ -4350,7 +4350,7 @@ ConversionPtr Conversion::convertToOtherMethod(int targetEPSGCode) const {
common::Length(
parameterValueMeasure(EPSG_CODE_PARAMETER_FALSE_NORTHING)));
conv->setCRSs(this, false);
- return conv;
+ return std::move(conv);
}
if (current_epsg_code == EPSG_CODE_METHOD_LAMBERT_CONIC_CONFORMAL_1SP &&
@@ -4385,7 +4385,7 @@ ConversionPtr Conversion::convertToOtherMethod(int targetEPSGCode) const {
common::Length(
parameterValueMeasure(EPSG_CODE_PARAMETER_FALSE_NORTHING)));
conv->setCRSs(this, false);
- return conv;
+ return std::move(conv);
} else {
const double K = k0 * m0 / std::pow(t0, n);
const double phi1 =
@@ -4441,7 +4441,7 @@ ConversionPtr Conversion::convertToOtherMethod(int targetEPSGCode) const {
EPSG_CODE_PARAMETER_FALSE_EASTING)),
common::Length(FN_corrected_rounded));
conv->setCRSs(this, false);
- return conv;
+ return std::move(conv);
}
}
@@ -4455,7 +4455,7 @@ ConversionPtr Conversion::convertToOtherMethod(int targetEPSGCode) const {
parameterValueMeasure(EPSG_CODE_PARAMETER_FALSE_EASTING)),
common::Length(FN));
conv->setCRSs(this, false);
- return conv;
+ return std::move(conv);
}
}
@@ -4519,7 +4519,7 @@ ConversionPtr Conversion::convertToOtherMethod(int targetEPSGCode) const {
EPSG_CODE_PARAMETER_NORTHING_FALSE_ORIGIN) +
(std::fabs(FN_correction) > 1e-8 ? FN_correction : 0)));
conv->setCRSs(this, false);
- return conv;
+ return std::move(conv);
}
return nullptr;
diff --git a/travis/mingw32/install.sh b/travis/mingw32/install.sh
index 6d388156..defe1485 100755
--- a/travis/mingw32/install.sh
+++ b/travis/mingw32/install.sh
@@ -26,7 +26,7 @@ make -j3
make install
make dist-all
find /tmp/proj_autoconf_install
-#make check
+(cd test; make -j3)
test/unit/test_cpp_api.exe
cd ..
# Now with grids