Commit 6175dc7f authored by Shervin Nourbakhsh's avatar Shervin Nourbakhsh
Browse files

(split) removed non-public headers from include

fixed tests including src in the as include header path
parent bdd78ad8
Pipeline #9324 failed with stage
...@@ -34,3 +34,14 @@ cmake .. ...@@ -34,3 +34,14 @@ cmake ..
cmake --build . cmake --build .
``` ```
## 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) ...@@ -2,26 +2,33 @@ set(CMAKE_CXX_STANDARD 17)
add_executable(testendpoint TestEndpoint.cpp) add_executable(testendpoint TestEndpoint.cpp)
target_link_libraries(testendpoint PUBLIC target_link_libraries(testendpoint PRIVATE
cameo cameo
) )
target_include_directories(testendpoint
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src/
)
add_test(endpoint testendpoint) add_test(endpoint testendpoint)
add_executable(testapplicationidentity TestApplicationIdentity.cpp) add_executable(testapplicationidentity TestApplicationIdentity.cpp)
target_link_libraries(testapplicationidentity
target_link_libraries(testapplicationidentity PUBLIC PRIVATE cameo
cameo )
) target_include_directories(testapplicationidentity
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src/
)
add_test(applicationidentity testapplicationidentity) add_test(applicationidentity testapplicationidentity)
add_executable(testapplicationwithstarteridentity TestApplicationWithStarterIdentity.cpp) add_executable(testapplicationwithstarteridentity TestApplicationWithStarterIdentity.cpp)
target_link_libraries(testapplicationwithstarteridentity PUBLIC target_link_libraries(testapplicationwithstarteridentity PRIVATE
cameo cameo
) )
target_include_directories(testapplicationwithstarteridentity
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src/
)
add_test(applicationwithstarteridentity testapplicationwithstarteridentity) add_test(applicationwithstarteridentity testapplicationwithstarteridentity)
#include "Test.h" #include "Test.h"
#include "../include/Strings.h" #include "Strings.h"
#include "../include/JSON.h" #include "JSON.h"
#include "../src/message/Message.h" #include "message/Message.h"
#include <iostream> #include <iostream>
using namespace std; using namespace std;
......
#include "Test.h" #include "Test.h"
#include "../include/Strings.h" #include "Strings.h"
#include "../include/JSON.h" #include "JSON.h"
#include "../src/message/Message.h" #include "message/Message.h"
#include <iostream> #include <iostream>
using namespace std; using namespace std;
......
#include "Test.h" #include "Test.h"
#include "../include/Strings.h" #include "Strings.h"
#include <iostream> #include <iostream>
using namespace std; 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