diff options
author | Lutz Bichler <Lutz.Bichler@bmw.de> | 2015-01-30 09:43:02 +0100 |
---|---|---|
committer | Lutz Bichler <Lutz.Bichler@bmw.de> | 2015-01-30 09:43:02 +0100 |
commit | e61b13ec595e74b2ce35b1b7aa7b31f05d113739 (patch) | |
tree | d4844acc8c529e0710dfc1394de0263daedf3862 | |
parent | c68b195d0e7929118c4277dcb0ad3cb1486fd842 (diff) | |
download | vSomeIP-e61b13ec595e74b2ce35b1b7aa7b31f05d113739.tar.gz |
[PATCH] CMakeLists.txt: add flag to also compile with GCC 4.7.2
Compiling the examples with GCC 4.7.2 fails with:
error: 'sleep_for' is not a member of 'std::this_thread'
General hints on the Internet [1, 2] explain the issue with
GCC 4.7.2. Hence, this commit adds the specific _GLIBCXX_USE_NANOSLEEP
definition that makes the compilation with GCC 4.7.2 possible.
[1]
http://stackoverflow.com/questions/12523122/what-is-glibcxx-use-nanosleep-all-about
[2]
http://stackoverflow.com/questions/4438084/stdthis-threadsleep-for-and-gcc
Signed-off-by: Lukas Bulwahn, BMW Car IT GmbH <Lukas.Bulwahn@bmw.de>
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aea1ee8..3fd07fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(EXPORTSYMBOLS "-Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc")
set(NO_DEPRECATED "")
set(OPTIMIZE "")
- set(OS_CXX_FLAGS "")
+ set(OS_CXX_FLAGS "-D_GLIBCXX_USE_NANOSLEEP")
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|