Skip to content

Commit 5963767

Browse files
committed
Fix locale issues
1 parent 37d6009 commit 5963767

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

dynadjust/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ if(BUILD_TESTING)
5959
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6060
endif()
6161

62-
# Set output directories for all platforms to use ../bin/
63-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../bin)
64-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../bin)
65-
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../bin)
62+
# Set output directories for all platforms to use ../bin/ (unless overridden)
63+
if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
64+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../bin)
65+
endif()
6666

6767
# For multi-config generators (Visual Studio, Xcode)
6868
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})

dynadjust/include/functions/dnaiostreamfuncs.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void print_file_header(
132132
stream << std::setw(PRINT_VAR_PAD) << std::left << "File created:";
133133
std::ostringstream datetime_ss;
134134
boost::posix_time::time_facet* p_time_output = new boost::posix_time::time_facet;
135-
std::locale special_locale (std::locale(""), p_time_output);
135+
std::locale special_locale (std::locale::classic(), p_time_output);
136136
// special_locale takes ownership of the p_time_output facet
137137
datetime_ss.imbue (special_locale);
138138
(*p_time_output).format("%A, %d %B %Y, %X");

dynadjust/include/functions/dnatemplatedatetimefuncs.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ T formattedDateTimeString()
548548
{
549549
std::stringstream datetime_ss, stream;
550550
boost::posix_time::time_facet* p_time_output = new boost::posix_time::time_facet;
551-
std::locale special_locale (std::locale(""), p_time_output);
551+
std::locale special_locale (std::locale::classic(), p_time_output);
552552

553553
// special_locale takes ownership of the p_time_output facet
554554
datetime_ss.imbue (special_locale);

0 commit comments

Comments
 (0)