Commit a32fcc83 authored by Shervin Nourbakhsh's avatar Shervin Nourbakhsh
Browse files

removed non-public headers from include

fixed tests including src in the as include header path
parent a80c7ff2
......@@ -42,4 +42,14 @@ In file included from /opt/panosc/cameo/src/impl/SocketWaitingImpl.h:23,
/usr/include/zmq.hpp:1267:10: note: declared here
bool recv(message_t *msg_, int flags_ = 0)
^~~~
## Development
How to find the list of public headers and check that they are all in the include/ directory
1. move all the headers in src/
2. move cameo.h to include/
3. run the following command multiple times until there is no output
```
#!/bin/fish
set -l ORIG_DIR src
for f in (for file in include/*; grep include $file | grep '"'; end | sort | uniq | sed 's|.* "||;s|"||'); if [ -e $ORIG_DIR/$f ] ; echo $f; git mv $ORIG_DIR/$f include/; end; end
```
......@@ -2,26 +2,33 @@ set(CMAKE_CXX_STANDARD 17)
add_executable(testendpoint TestEndpoint.cpp)
target_link_libraries(testendpoint PUBLIC
target_link_libraries(testendpoint PRIVATE
cameo
)
target_include_directories(testendpoint
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src/
)
add_test(endpoint testendpoint)
add_executable(testapplicationidentity TestApplicationIdentity.cpp)
target_link_libraries(testapplicationidentity PUBLIC
cameo
)
target_link_libraries(testapplicationidentity
PRIVATE cameo
)
target_include_directories(testapplicationidentity
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src/
)
add_test(applicationidentity testapplicationidentity)
add_executable(testapplicationwithstarteridentity TestApplicationWithStarterIdentity.cpp)
target_link_libraries(testapplicationwithstarteridentity PUBLIC
target_link_libraries(testapplicationwithstarteridentity PRIVATE
cameo
)
target_include_directories(testapplicationwithstarteridentity
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src/
)
add_test(applicationwithstarteridentity testapplicationwithstarteridentity)
#include "Test.h"
#include "../include/Strings.h"
#include "../include/JSON.h"
#include "../src/message/Message.h"
#include "Strings.h"
#include "JSON.h"
#include "message/Message.h"
#include <iostream>
using namespace std;
......
#include "Test.h"
#include "../include/Strings.h"
#include "../include/JSON.h"
#include "../src/message/Message.h"
#include "Strings.h"
#include "JSON.h"
#include "message/Message.h"
#include <iostream>
using namespace std;
......
#include "Test.h"
#include "../include/Strings.h"
#include "Strings.h"
#include <iostream>
using namespace std;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment