[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/07: cmake: cmake doesn't have a FIND com
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/07: cmake: cmake doesn't have a FIND command for STRING until 2.8.5, so we're just cehcking for that here before using it. |
Date: |
Mon, 28 Jul 2014 18:42:38 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 7f847769126c3141aa1db0b24bb82f80b8524e87
Author: Tom Rondeau <address@hidden>
Date: Mon Jul 28 10:41:10 2014 -0400
cmake: cmake doesn't have a FIND command for STRING until 2.8.5, so we're
just cehcking for that here before using it.
Using cmake < 2.8.5 will not dedup the cflags, but this is non-critical.
---
cmake/Modules/GrMiscUtils.cmake | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake
index 69eae0e..188c404 100644
--- a/cmake/Modules/GrMiscUtils.cmake
+++ b/cmake/Modules/GrMiscUtils.cmake
@@ -94,11 +94,13 @@ macro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(${flag} ${have})
if(${have})
- STRING(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_dup)
- if(${flag_dup} EQUAL -1)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
- endif(${flag_dup} EQUAL -1)
+ if(${CMAKE_VERSION} VERSION_GREATER "2.8.4")
+ STRING(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_dup)
+ if(${flag_dup} EQUAL -1)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
+ endif(${flag_dup} EQUAL -1)
+ endif(${CMAKE_VERSION} VERSION_GREATER "2.8.4")
endif(${have})
endmacro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE)
- [Commit-gnuradio] [gnuradio] branch master updated (67ab045 -> e876905), git, 2014/07/28
- [Commit-gnuradio] [gnuradio] 07/07: Merge branch 'maint', git, 2014/07/28
- [Commit-gnuradio] [gnuradio] 06/07: docs: added some cmake cli flags to better configure the build., git, 2014/07/28
- [Commit-gnuradio] [gnuradio] 01/07: cmake: cmake doesn't have a FIND command for STRING until 2.8.5, so we're just cehcking for that here before using it.,
git <=
- [Commit-gnuradio] [gnuradio] 04/07: volk: calling enable_languages here is buggy until 2.8.10. Version checking for that., git, 2014/07/28
- [Commit-gnuradio] [gnuradio] 02/07: trellis: updated examples., git, 2014/07/28
- [Commit-gnuradio] [gnuradio] 05/07: trellis: minor fixups to trellis examples so prefix doesn't need to end with '/'., git, 2014/07/28
- [Commit-gnuradio] [gnuradio] 03/07: trellis: working on issue to fix locations of fsm files in examples., git, 2014/07/28