diff --git a/CMake/GenerateConfigProperties.cpp b/CMake/GenerateConfigProperties.cpp index dff2569f04e4ce7b394f20b02fa156d50e784f70..9141a91c0431d9ff595060d1da5ffc7d55b6f0d8 100644 --- a/CMake/GenerateConfigProperties.cpp +++ b/CMake/GenerateConfigProperties.cpp @@ -33,7 +33,7 @@ PURPOSE. See the above copyright notices for more information. */ int main(int argc, char* argv[]) { - const unsigned int nbParameters = 3; + const unsigned int nbParameters = 2; std::ofstream os(argv[1]); if (!os) @@ -57,22 +57,26 @@ int main(int argc, char* argv[]) paramVector.push_back(""); } } + + /** Get local configuration*/ + const std::locale& mylocale = std::locale(""); + /** Write parameters to the configuration file*/ os << "#Auto generated by config-properties \n" << "OTB_LANG=" - << paramVector[0] + << mylocale.name() << "\n" << "OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING=" - << paramVector[1] + << paramVector[0] << "\n" << "OTB_STREAM_MAX_SIZE_BUFFER_FOR_STREAMING=" - << paramVector[2] + << paramVector[1] << "\n" << "#End of config file properties generation" << std::endl; os.close(); - + std::cout << "wrote file: " << argv[1] << std::endl; exit(0); diff --git a/CMakeLists.txt b/CMakeLists.txt index 6362ca15d2604eb71db2c49d4db84707279a1227..8f3c2e2485dce0054ba5f80c4dcb854b5c823839 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1146,3 +1146,5 @@ INCLUDE(CPack) ENDIF(OTB_USE_CPACK) + + ARGS "${otbconfigfile_DEFAULT}" "${OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING}" "${OTB_STREAM_MAX_SIZE_BUFFER_FOR_STREAMING}" \ No newline at end of file diff --git a/Testing/Code/Common/otbConfigurationTest.cxx b/Testing/Code/Common/otbConfigurationTest.cxx index 5ddcf80a50ec9b02a703a8449c8eb749e88c5dc1..62dcc47e07d9ba48249c648fae3a6db01a6f9049 100644 --- a/Testing/Code/Common/otbConfigurationTest.cxx +++ b/Testing/Code/Common/otbConfigurationTest.cxx @@ -34,7 +34,10 @@ int otbConfigurationTest(int argc, char * argv[]) std::cout << conf << std::endl; if (lang != "fr_FR.UTF-8") - return EXIT_FAILURE; + { + std::cout << "Locale language " << lang << std::endl; + return EXIT_FAILURE; + } return EXIT_SUCCESS; }