Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
b18eb603
Commit
b18eb603
authored
Nov 07, 2015
by
Baruch Sterin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMakeLists.txt, Makefile: fix a bug in passing the readline options
parent
e50fc467
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
CMakeLists.txt
+13
-3
Makefile
+0
-7
No files found.
CMakeLists.txt
View file @
b18eb603
...
...
@@ -4,6 +4,13 @@ include(CMakeParseArguments)
include
(
CheckCCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
function
(
addprefix var prefix
)
foreach
(
s
${
ARGN
}
)
list
(
APPEND tmp
"-I
${
s
}
"
)
endforeach
()
set
(
${
var
}
${
tmp
}
PARENT_SCOPE
)
endfunction
()
# filter out flags that are not appropriate for the compiler being used
function
(
target_compile_options_filtered target visibility
)
foreach
(
flag
${
ARGN
}
)
...
...
@@ -26,9 +33,12 @@ endfunction()
project
(
abc
)
if
(
READLINE_FOUND MATCHES TRUE
)
addprefix
(
READLINE_INCLUDES_FLAGS
"-I"
${
READLINE_INCLUDES
}
)
list
(
APPEND ABC_READLINE_FLAGS
"ABC_READLINE_INCLUDES=
${
READLINE_INCLUDES_FLAGS
}
"
)
list
(
APPEND ABC_READLINE_FLAGS
"ABC_READLINE_LIBRARIES=
${
READLINE_LIBRARIES
}
"
)
addprefix
(
ABC_READLINE_INCLUDES_FLAGS
"-I"
${
READLINE_INCLUDES
}
)
string
(
REPLACE
";"
" "
ABC_READLINE_INCLUDES_FLAGS
"
${
ABC_READLINE_INCLUDES_FLAGS
}
"
)
list
(
APPEND ABC_READLINE_FLAGS
"ABC_READLINE_INCLUDES=
${
ABC_READLINE_INCLUDES_FLAGS
}
"
)
string
(
REPLACE
";"
" "
ABC_READLINE_LIBRARIES_FLAGS
"
${
READLINE_LIBRARIES
}
"
)
list
(
APPEND ABC_READLINE_FLAGS
"ABC_READLINE_LIBRARIES=
${
ABC_READLINE_LIBRARIES_FLAGS
}
"
)
elseif
(
READLINE_FOUND MATCHES FALSE
)
list
(
APPEND ABC_READLINE_FLAGS
"ABC_USE_NO_READLINE=1"
)
endif
()
...
...
Makefile
View file @
b18eb603
...
...
@@ -73,13 +73,6 @@ ifndef ABC_USE_NO_READLINE
$(info
$(MSG_PREFIX)Using
libreadline)
endif
# whether to use libreadline
ifndef
ABC_USE_NO_READLINE
CFLAGS
+=
-DABC_USE_READLINE
LIBS
+=
-lreadline
$(info
$(MSG_PREFIX)Using
libreadline)
endif
# whether to compile with thread support
ifdef
ABC_USE_NO_PTHREADS
CFLAGS
+=
-DABC_USE_PTHREADS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment