# Missing Separator error

**URL:** <https://discourse.cmake.org/t/missing-separator-error/4947>\
**Category:** Code\
**Tags:** os:linux\
**Created:** [February 2, 2022, 10:11am UTC](https://discourse.cmake.org/t/missing-separator-error/4947 "2022-02-02T10:11:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fenixD](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenixd/32/2150_2.png) [@fenixD](https://discourse.cmake.org/u/fenixD)\
**Post date:** [February 2, 2022, 10:11am UTC](https://discourse.cmake.org/t/missing-separator-error/4947/1 "2022-02-02T10:11:43Z")

</div>

Hello everyone 🙂

I get a missing separator error, when I change **PRIVATE** to **PUBLIC** specificator in _target\_include\_directories_ statement. I have 3 shared libraries and I change the specificator only in one ( **libutils** for example), but the others link the first ( **liboracle** , **libpostgres** ).  
So, the **liboracle** is compiled well, but compilation **libpostgres** generate this error.

```auto
seclibs_postgres/CMakeFiles/seclibs_postgres.dir/flags.make:8: *** missing separator. Stop.

```

I don’t understand, why?

cmake version 3.21.3  
3 short-cut cmakes are below.  
_libutils_:

```auto
find_library(Boost_FS boost_filesystem HINTS ${Boost_LIBRARY_DIRS})

add_library(${PROJECT_NAME} SHARED
    logger/Logger.cpp
    helpers.cpp
    strings/CUCS2String.cpp
    strings/CUCS2ErrorManager.cpp
    socket/CUnixSocket.cpp
    socket/SocketConnectorBase.cpp)

target_include_directories(${PROJECT_NAME} PUBLIC
    ${PROJECT_SOURCE_DIR}
    logger
    strings
    socket
    users
    ${Boost_INCLUDE_DIRS})

target_link_libraries(${PROJECT_NAME} PUBLIC ${Boost_FS})

```

_liboracle_:

```auto
add_library(${PROJECT_NAME} SHARED
        seclibs_oracle.cpp
        OracleHelpers.cpp
        OracleString.cpp
        OracleQueryExecutor.cpp
        OracleConnectionManager.cpp)

target_include_directories(${PROJECT_NAME} PRIVATE
        ${ORACLE_INCLUDE_DIR})

if(LINUX)
    target_link_libraries(${PROJECT_NAME} rt utils)
else()
    target_link_libraries(${PROJECT_NAME} ${ORACLE_LIBRARIES} utils)
endif()

```

_libpostgres_:

```auto
add_library(${PROJECT_NAME} SHARED
    PostgresConnectionManager.cpp
    PostgresHelpers.cpp
    seclibs_postgres.cpp
    PostgresUserFinder.cpp)

target_include_directories(${PROJECT_NAME} PRIVATE
    ${PostgreSQL_INCLUDE_DIR})

if(LINUX)
    target_link_libraries(${PROJECT_NAME} rt utils)
else()
    target_link_libraries(${PROJECT_NAME} rt utils)
endif()

```

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [February 2, 2022, 1:30pm UTC](https://discourse.cmake.org/t/missing-separator-error/4947/2 "2022-02-02T13:30:56Z")

</div>

Could you share the line in `flags.cmake` that has the error?

---

<div class="post-metadata">

**Author:** ![fenixD](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenixd/32/2150_2.png) [@fenixD](https://discourse.cmake.org/u/fenixD)\
**Post date:** [February 2, 2022, 2:59pm UTC](https://discourse.cmake.org/t/missing-separator-error/4947/3 "2022-02-02T14:59:52Z")

</div>

```auto
CXX_INCLUDES = -I/usr/include/pgsql/server
 -I/home/filiptsev/seclibs/utils -I/home/filiptsev/seclibs/utils/logger -I/home/filiptsev/seclibs/utils/strings -I/home/filiptsev/seclibs/utils/socket -I/home/filiptsev/seclibs/utils/users -I/usr/local/boost_1_76_0

```

The 8th line in file is the second line here. I am not sure that the following is the answer, but cmake didn’t generate symbol ‘’ at the first line end.

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [February 2, 2022, 3:55pm UTC](https://discourse.cmake.org/t/missing-separator-error/4947/4 "2022-02-02T15:55:42Z")

</div>

It seems that the `PostgreSQL_INCLUDE_DIR` value has a newline in it. Can you print it out in `libpostgres`? Something like:

```cmake
message("PostgreSQL_INCLUDE_DIR: -->${PostgreSQL_INCLUDE_DIR}<--")

```

so that the beginning and end are marked.

---

<div class="post-metadata">

**Author:** ![fenixD](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenixd/32/2150_2.png) [@fenixD](https://discourse.cmake.org/u/fenixD)\
**Post date:** [February 2, 2022, 4:16pm UTC](https://discourse.cmake.org/t/missing-separator-error/4947/5 "2022-02-02T16:16:08Z")

</div>

```auto
-- Postgres include dir: --->/usr/include/pgsql/server
<-----

```

Yeah, you are right 🙂 Thx, I’ll try use string(STRIP, …) now

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [February 2, 2022, 6:24pm UTC](https://discourse.cmake.org/t/missing-separator-error/4947/6 "2022-02-02T18:24:27Z")

</div>

If you get it from `execute_process`, there is `OUTPUT_STRIP_TRAILING_WHITESPACE`.
