mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
Merge branch '2.4.2' into lexer2
This commit is contained in:
commit
9898aa15b5
2 changed files with 12 additions and 4 deletions
|
@ -28,13 +28,13 @@ CHECK_CXX_COMPILER_FLAG("-std=c++0x" _HAS_CXX0X)
|
||||||
CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" _HAS_GNU0X)
|
CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" _HAS_GNU0X)
|
||||||
|
|
||||||
if (_HAS_CXX11)
|
if (_HAS_CXX11)
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set (_CXX11_FLAGS "-std=c++11")
|
||||||
elseif (_HAS_CXX0X)
|
elseif (_HAS_CXX0X)
|
||||||
message (WARNING "Enabling -std=c++0x draft compile flag. Your compiler does not support the standard '-std=c++11' option. Consider upgrading.")
|
message (WARNING "Enabling -std=c++0x draft compile flag. Your compiler does not support the standard '-std=c++11' option. Consider upgrading.")
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
set (_CXX11_FLAGS "-std=c++0x")
|
||||||
elseif (_HAS_GNU0X)
|
elseif (_HAS_GNU0X)
|
||||||
message (WARNING "Enabling -std=gnu++0x draft compile flag. Your compiler does not support the standard '-std=c++11' option. Consider upgrading.")
|
message (WARNING "Enabling -std=gnu++0x draft compile flag. Your compiler does not support the standard '-std=c++11' option. Consider upgrading.")
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
set (_CXX11_FLAGS "-std=gnu++0x")
|
||||||
else (_HAS_CXX11)
|
else (_HAS_CXX11)
|
||||||
message (FATAL_ERROR "C++11 support missing. Try upgrading your C++ compiler. If you have a good reason for using an outdated compiler, please let us know at support@taskwarrior.org.")
|
message (FATAL_ERROR "C++11 support missing. Try upgrading your C++ compiler. If you have a good reason for using an outdated compiler, please let us know at support@taskwarrior.org.")
|
||||||
endif (_HAS_CXX11)
|
endif (_HAS_CXX11)
|
||||||
|
@ -43,7 +43,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set (LINUX true)
|
set (LINUX true)
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
set (DARWIN true)
|
set (DARWIN true)
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
set (_CXX11_FLAGS "${_CXX11_FLAGS} -stdlib=libc++")
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
|
||||||
set (KFREEBSD true)
|
set (KFREEBSD true)
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||||
|
@ -58,10 +58,16 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
|
||||||
set (GNUHURD true)
|
set (GNUHURD true)
|
||||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "CYGWIN")
|
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "CYGWIN")
|
||||||
set (CYGWIN true)
|
set (CYGWIN true)
|
||||||
|
# NOTE: Not setting -std=gnu++0x leads to compile errors even with
|
||||||
|
# GCC 4.8.3, and debugging those leads to insanity. Adding this
|
||||||
|
# workaround instead of fixing Cygwin.
|
||||||
|
set (_CXX11_FLAGS "-std=gnu++0x")
|
||||||
else (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
else (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set (UNKNOWN true)
|
set (UNKNOWN true)
|
||||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
|
||||||
|
set (CMAKE_CXX_FLAGS "${_CXX11_FLAGS} ${CMAKE_CXX_FLAGS}")
|
||||||
|
|
||||||
if (NETBSD)
|
if (NETBSD)
|
||||||
# Since readline, etc likely to be in /usr/pkg/lib, not standard library
|
# Since readline, etc likely to be in /usr/pkg/lib, not standard library
|
||||||
# Otherwise will remove links during install
|
# Otherwise will remove links during install
|
||||||
|
|
|
@ -299,9 +299,11 @@ int execute (
|
||||||
|
|
||||||
if (dup2 (pin[0], STDIN_FILENO) == -1)
|
if (dup2 (pin[0], STDIN_FILENO) == -1)
|
||||||
throw std::string (std::strerror (errno));
|
throw std::string (std::strerror (errno));
|
||||||
|
close (pin[0]);
|
||||||
|
|
||||||
if (dup2 (pout[1], STDOUT_FILENO) == -1)
|
if (dup2 (pout[1], STDOUT_FILENO) == -1)
|
||||||
throw std::string (std::strerror (errno));
|
throw std::string (std::strerror (errno));
|
||||||
|
close (pout[1]);
|
||||||
|
|
||||||
char** argv = new char* [args.size () + 2];
|
char** argv = new char* [args.size () + 2];
|
||||||
argv[0] = (char*) executable.c_str ();
|
argv[0] = (char*) executable.c_str ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue